diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-02-17 15:17:13 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-02-17 18:12:25 +0100 |
commit | fc6aabe9380017fab34105f9aed4c408c57e98ec (patch) | |
tree | b545ce667ff3c817ca9f364120c961e05854299d /hugolib/content_map_page.go | |
parent | 9cc65757a137206fda2d49e8975ae36b01017812 (diff) | |
download | hugo-fc6aabe9380017fab34105f9aed4c408c57e98ec.tar.gz hugo-fc6aabe9380017fab34105f9aed4c408c57e98ec.zip |
Fix handling of draft term pages
By just removing the term page and all of its page entries.
Fixes #12055
Diffstat (limited to 'hugolib/content_map_page.go')
-rw-r--r-- | hugolib/content_map_page.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index 70e8a0bb6..d9cbddfba 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -1415,8 +1415,10 @@ func (sa *sitePagesAssembler) applyAggregatesToTaxonomiesAndTerms() error { if err := p.setMetaPost(cascade); err != nil { return false, err } - - if err := sa.pageMap.treeTaxonomyEntries.WalkPrefix( + if !p.s.shouldBuild(p) { + sa.pageMap.treePages.Delete(s) + sa.pageMap.treeTaxonomyEntries.DeletePrefix(paths.AddTrailingSlash(s)) + } else if err := sa.pageMap.treeTaxonomyEntries.WalkPrefix( doctree.LockTypeRead, paths.AddTrailingSlash(s), func(ss string, wn *weightedContentNode) (bool, error) { |