diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-04-15 11:33:53 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-04-16 09:17:47 +0200 |
commit | 1cf29200b4bb0a9c006155ec76759b7f4b1ad925 (patch) | |
tree | b328cff2c47a3aa025423009bc16a4a02290f8c9 /tpl/tplimpl/template_funcs.go | |
parent | 8ccee6717cba911296a80ad9801be906193f01d3 (diff) |
tplimpl: Allow text partials in HTML templates
Most obvius benefit of this is to include CSS partials with css file suffix into HTML templates.
A valid workaround would be to rename the file `mystyles.html`, but that doesn't work too good for external editors etc.
The css partial is a method used in some themes before Hugo 0.20, but then it stopped working.
This commit reintroduces that behaviour.
Note that the regular layout lookups for text templates, i.e. "single.json" will be
prefixed with "_text/" on lookup and will only match in the text collection.
Fixes #3273
Diffstat (limited to 'tpl/tplimpl/template_funcs.go')
-rw-r--r-- | tpl/tplimpl/template_funcs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/tplimpl/template_funcs.go b/tpl/tplimpl/template_funcs.go index 273753388..54cff81c6 100644 --- a/tpl/tplimpl/template_funcs.go +++ b/tpl/tplimpl/template_funcs.go @@ -2221,5 +2221,5 @@ func (t *templateFuncster) initFuncMap() { } t.funcMap = funcMap - t.Tmpl.setFuncs(funcMap) + t.Tmpl.(*templateHandler).setFuncs(funcMap) } |