mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
tpl: Must do a extra lookup of cloned base templates
See #2549 Fixes #3013
This commit is contained in:
parent
f404603340
commit
a89fb86cdf
1 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,10 @@ func (*TemplateProvider) Clone(d *deps.Deps) error {
|
||||||
|
|
||||||
for k, v := range t.overlays {
|
for k, v := range t.overlays {
|
||||||
vc := template.Must(v.Clone())
|
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)
|
vc.Funcs(tmpl.funcster.funcMap)
|
||||||
tmpl.overlays[k] = vc
|
tmpl.overlays[k] = vc
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue