mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
node to page: Fix the Page copy()
By embeding the init sync.Once var in a pointer so we can reset it when we copy the page. Updates #2297
This commit is contained in:
@@ -304,6 +304,7 @@ func (h *HugoSites) createMissingPages() error {
|
||||
// Move the new* methods after cleanup in site.go
|
||||
func (s *Site) newNodePage(typ string) *Page {
|
||||
return &Page{
|
||||
pageInit: &pageInit{},
|
||||
Kind: typ,
|
||||
Data: make(map[string]interface{}),
|
||||
Site: &s.Info,
|
||||
|
Reference in New Issue
Block a user