diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-16 22:56:16 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-16 22:56:16 +0300 |
| commit | 7662ae52c08c659f5aaf69f446822f48c3d0a831 (patch) | |
| tree | fdfea527a24c9adf255a467d7e15257412a0b607 /integrationtests | |
| parent | dd50c9b1d335365901467d5868ca7f026ed8209a (diff) | |
refactor(generator): load themes & shared HTML from embedded template files (task s4)
Move the 12 theme HTML templates out of theme_*.go (~185KB of raw-string
literals) and the shared navDefs/faviconHeadHTML fragments out of
shared.go/favicon.go into separate .tmpl files under
internal/generator/templates/{themes,shared}/. A new templates subpackage
owns a //go:embed FS and exposes Theme(), Shared() and ThemeNames()
helpers so the binary still ships fully self-contained.
The hand-maintained themeRegistry map is replaced by on-startup
enumeration of the embedded FS; getTheme/ListThemes now derive theme
names from the template files themselves, and navDefs/faviconHeadHTML
are loaded once at package init. Rendered output is byte-equivalent — all
unit tests and integration tests pass, go vet is clean.
Made-with: Cursor
Diffstat (limited to 'integrationtests')
0 files changed, 0 insertions, 0 deletions
