Phase 2 wiki template refactor

This commit is contained in:
2026-05-20 13:48:38 +02:00
parent 11f0863d0a
commit 3feea8df81
7 changed files with 1181 additions and 21 deletions
+6
View File
@@ -262,6 +262,7 @@ topdata:
renderer: nodebb_tiptap_html
link_strategy: preserve_westgate_wiki_links
namespaces_file: namespaces.yaml
tables_file: custom-tables.yaml
templates_dir: templates
manual_sections_dir: manual-sections
deploy_manifest: wiki-manifest.json
@@ -319,6 +320,9 @@ autogen:
if got, want := effective.TopData.Wiki.NamespacesFile, "namespaces.yaml"; got != want {
t.Fatalf("expected wiki namespaces file %q, got %q", want, got)
}
if got, want := effective.TopData.Wiki.TablesFile, "custom-tables.yaml"; got != want {
t.Fatalf("expected wiki tables file %q, got %q", want, got)
}
if got, want := effective.TopData.Wiki.TemplatesDir, "templates"; got != want {
t.Fatalf("expected wiki templates dir %q, got %q", want, got)
}
@@ -758,6 +762,7 @@ func TestValidateLayoutRejectsInvalidTopDataWikiConfig(t *testing.T) {
Renderer: "dokuwiki",
LinkStrategy: "rewrite_links",
NamespacesFile: "../namespaces.yaml",
TablesFile: "../tables.yaml",
TemplatesDir: ".",
ManualSectionsDir: "../manual",
StalePages: TopDataWikiStalePagesConfig{
@@ -778,6 +783,7 @@ func TestValidateLayoutRejectsInvalidTopDataWikiConfig(t *testing.T) {
"topdata.wiki.renderer",
"topdata.wiki.link_strategy",
"topdata.wiki.namespaces_file",
"topdata.wiki.tables_file",
"topdata.wiki.templates_dir",
"topdata.wiki.manual_sections_dir",
"topdata.wiki.stale_pages.default",