hugolib: Fix Pages reinitialization on rebuilds

Which had some unpredictable behaviour when using `.Pages` on home page etc. that had a content page.

Fixes #5833
This commit is contained in:
Bjørn Erik Pedersen
2019-04-17 10:36:36 +02:00
parent 2957795f52
commit 9b17cbb62a
4 changed files with 17 additions and 5 deletions

View File

@@ -1630,6 +1630,7 @@ func (s *Site) resetBuildState() {
s.init.Reset()
for _, p := range s.rawAllPages {
p.pagePages = &pagePages{}
p.subSections = page.Pages{}
p.parent = nil
p.Scratcher = maps.NewScratcher()