summaryrefslogtreecommitdiffstats
path: root/hugolib/page__common.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-04-17 10:36:36 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-04-17 12:56:46 +0200
commit9b17cbb62a056ea7e26b1146cbf3ba42f5acf805 (patch)
tree28c79605fd536905bc365158993b2b2374045698 /hugolib/page__common.go
parent2957795f5276cc9bc8d438da2d7d9b61defea225 (diff)
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
Diffstat (limited to 'hugolib/page__common.go')
-rw-r--r--hugolib/page__common.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/hugolib/page__common.go b/hugolib/page__common.go
index 01280bb40..f9ceee8c9 100644
--- a/hugolib/page__common.go
+++ b/hugolib/page__common.go
@@ -87,8 +87,7 @@ type pageCommon struct {
page.InternalDependencies
// The children. Regular pages will have none.
- pages page.Pages
- pagesInit sync.Once
+ *pagePages
// Any bundled resources
resources resource.Resources
@@ -111,3 +110,8 @@ type pageCommon struct {
// Set in fast render mode to force render a given page.
forceRender bool
}
+
+type pagePages struct {
+ pages page.Pages
+ pagesInit sync.Once
+}