Don't auto-create empty sections for nested taxonomies

Fixes #12188
This commit is contained in:
Bjørn Erik Pedersen
2024-03-07 09:07:12 +01:00
parent a4b17470a8
commit 7afac3f1ad
2 changed files with 42 additions and 0 deletions

View File

@@ -1814,6 +1814,14 @@ func (sa *sitePagesAssembler) addMissingRootSections() error {
return false, nil
}
switch ps.Kind() {
case kinds.KindPage, kinds.KindSection:
// OK
default:
// Skip taxonomy nodes etc.
return false, nil
}
p := ps.m.pathInfo
section := p.Section()
if section == "" || seen[section] {