Skip to content

Commit

Permalink
tpl: Must do a extra lookup of cloned base templates
Browse files Browse the repository at this point in the history
See #2549
Fixes #3013
  • Loading branch information
bep committed Feb 7, 2017
1 parent f404603 commit a89fb86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tpl/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func (*TemplateProvider) Clone(d *deps.Deps) error {

for k, v := range t.overlays {
vc := template.Must(v.Clone())
// The extra lookup is a workaround, see
// * https://github.com/golang/go/issues/16101
// * https://github.com/spf13/hugo/issues/2549
vc = vc.Lookup(vc.Name())
vc.Funcs(tmpl.funcster.funcMap)
tmpl.overlays[k] = vc
}
Expand Down

0 comments on commit a89fb86

Please sign in to comment.