Add a newScratch template func

Fixes #4685
This commit is contained in:
Bjørn Erik Pedersen
2018-07-06 14:12:10 +02:00
parent 43338c3a99
commit 2b8d907ab7
14 changed files with 319 additions and 231 deletions

View File

@@ -27,6 +27,7 @@ import (
"strings"
"time"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/resource"
"github.com/gohugoio/hugo/langs"
@@ -1509,7 +1510,7 @@ func (s *Site) resetBuildState() {
for _, p := range s.rawAllPages {
p.subSections = Pages{}
p.parent = nil
p.scratch = newScratch()
p.scratch = maps.NewScratch()
p.mainPageOutput = nil
}
}