mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user