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:
Bjørn Erik Pedersen
2016-11-16 20:32:38 +01:00
parent 62e9e7e6ba
commit 99d11386a7
6 changed files with 32 additions and 30 deletions

View File

@@ -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,