diff options
Diffstat (limited to 'hugolib/alias.go')
-rw-r--r-- | hugolib/alias.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hugolib/alias.go b/hugolib/alias.go index dbb864384..3b053130e 100644 --- a/hugolib/alias.go +++ b/hugolib/alias.go @@ -59,13 +59,14 @@ func (a aliasHandler) renderAlias(isXHTML bool, permalink string, page *Page) (i t = "alias-xhtml" } - var templ *tpl.TemplateAdapter + var templ tpl.Template + var found bool if a.t != nil { - templ = a.t.Lookup("alias.html") + templ, found = a.t.Lookup("alias.html") } - if templ == nil { + if !found { def := defaultAliasTemplates.Lookup(t) if def != nil { templ = &tpl.TemplateAdapter{Template: def} |