hugolib: Use the site's Tmpl for non-renderable pages
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 9 Feb 2017 18:28:02 +0000 (01:28 +0700)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 10 Feb 2017 03:44:35 +0000 (10:44 +0700)
hugolib/page.go

index 84d017126f78d6f730eead549e499d7a1a18a667..145250634fda03b8991138b74a98347cde9cada2 100644 (file)
@@ -1465,7 +1465,7 @@ func (p *Page) prepareLayouts() error {
                var layouts []string
                if !p.IsRenderable() {
                        self := "__" + p.TargetPath()
-                       _, err := p.Site.owner.Tmpl.GetClone().New(self).Parse(string(p.Content))
+                       _, err := p.s.Tmpl.GetClone().New(self).Parse(string(p.Content))
                        if err != nil {
                                return err
                        }