mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Revert "Create template clone for late template execution"
This reverts commit 93b04e67f6
.
This commit is contained in:
@@ -595,7 +595,6 @@ func (s *Site) prepTemplates() {
|
||||
if s.hasTheme() {
|
||||
s.Tmpl.LoadTemplatesWithPrefix(s.absThemeDir()+"/layouts", "theme")
|
||||
}
|
||||
s.Tmpl.MarkReady()
|
||||
}
|
||||
|
||||
func (s *Site) addTemplate(name, data string) error {
|
||||
@@ -1367,15 +1366,11 @@ func (s *Site) RenderPages() error {
|
||||
// this cannot be fanned out to multiple Go routines
|
||||
// See issue #1601
|
||||
// TODO(bep): Check the IsRenderable logic.
|
||||
|
||||
// Issue #1879
|
||||
templ := s.Tmpl.Clone()
|
||||
|
||||
for _, p := range s.Pages {
|
||||
var layouts []string
|
||||
if !p.IsRenderable() {
|
||||
self := "__" + p.TargetPath()
|
||||
_, err := templ.New(self).Parse(string(p.Content))
|
||||
_, err := s.Tmpl.New(self).Parse(string(p.Content))
|
||||
if err != nil {
|
||||
results <- err
|
||||
continue
|
||||
|
Reference in New Issue
Block a user