tplimpl: Allow text partials in HTML templates
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 15 Apr 2017 09:33:53 +0000 (11:33 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 16 Apr 2017 09:04:52 +0000 (11:04 +0200)
commit5f600fdd9f9c4d40b53c78c99273921d9c99f941
treee9f2e9271b21ee05d30bf000c464eb5db711cdfe
parent8ac1fcd0ceb5d2e55e16a9caa7f6f0d646a07668
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
tpl/tplimpl/template.go
tpl/tplimpl/templateFuncster.go
tpl/tplimpl/template_funcs.go
tpl/tplimpl/template_funcs_test.go