mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03: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:
parent
2957795f52
commit
9b17cbb62a
4 changed files with 17 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue