diff options
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/content_map_page.go | 4 | ||||
-rw-r--r-- | hugolib/page__new.go | 2 | ||||
-rw-r--r-- | hugolib/site.go | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index bcab9ffa9..5607749c9 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -797,6 +797,10 @@ type pagesMapBucket struct { owner *pageState // The branch node + *pagesMapBucketPages +} + +type pagesMapBucketPages struct { pagesInit sync.Once pages page.Pages diff --git a/hugolib/page__new.go b/hugolib/page__new.go index 4f8abdde5..938c13d7c 100644 --- a/hugolib/page__new.go +++ b/hugolib/page__new.go @@ -93,7 +93,7 @@ func newPageBase(metaProvider *pageMeta) (*pageState, error) { } func newPageBucket(p *pageState) *pagesMapBucket { - return &pagesMapBucket{owner: p} + return &pagesMapBucket{owner: p, pagesMapBucketPages: &pagesMapBucketPages{}} } func newPageFromMeta( diff --git a/hugolib/site.go b/hugolib/site.go index 56fa654db..5688b5fac 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -1492,6 +1492,9 @@ func (s *Site) resetBuildState(sourceChanged bool) { s.PageCollections = newPageCollections(s.pageMap) s.pageMap.withEveryBundlePage(func(p *pageState) bool { p.pagePages = &pagePages{} + if p.bucket != nil { + p.bucket.pagesMapBucketPages = &pagesMapBucketPages{} + } p.parent = nil p.Scratcher = maps.NewScratcher() return false |