Answer architecture round 3: the generated header names go generate, one sorted-keys helper everywhere, one site constructor, and an inline folder reference refused before anything loads

This commit is contained in:
2026-10-03 17:46:28 +02:00
committed by Lillem4n
parent 3bb8628e39
commit cc8797744b
10 changed files with 32 additions and 42 deletions
+5 -1
View File
@@ -203,13 +203,17 @@ func categorySites(root *folder) []categorySite {
walk(append(dir[:len(dir):len(dir)], name), sub)
continue
}
out = append(out, categorySite{dir: dir, path: join(strings.Join(dir, "."), name), in: g, n: g.children[name]})
out = append(out, siteIn(dir, g, name))
}
}
walk(nil, root)
return out
}
func siteIn(dir []string, in *folder, name string) categorySite {
return categorySite{dir: dir, path: join(strings.Join(dir, "."), name), in: in, n: in.children[name]}
}
func sitesScope(sites []categorySite) nodeScope {
return func(fn func(path string, n node) error) error {
for _, s := range sites {