mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
tplimpl: Reintroduce the double template lookup in Partial
So it works as before without the html suffix. Fixes #3272
This commit is contained in:
@@ -63,6 +63,10 @@ func (t *templateFuncster) partial(name string, contextList ...interface{}) (int
|
||||
|
||||
for _, n := range []string{"partials/" + name, "theme/partials/" + name} {
|
||||
templ := t.Tmpl.Lookup(n)
|
||||
if templ == nil {
|
||||
// For legacy reasons.
|
||||
templ = t.Tmpl.Lookup(n + ".html")
|
||||
}
|
||||
if templ != nil {
|
||||
b := bp.GetBuffer()
|
||||
defer bp.PutBuffer(b)
|
||||
|
Reference in New Issue
Block a user