Add shortcode template loading from themes directory.

This commit is contained in:
Nicholas Whittier 2014-06-26 14:47:51 -06:00 committed by spf13
parent 35d04671d3
commit ac99ceccac

View file

@ -150,6 +150,9 @@ func GetTemplate(name string, t Template) *template.Template {
if x := t.Lookup("shortcodes/" + name + ".html"); x != nil { if x := t.Lookup("shortcodes/" + name + ".html"); x != nil {
return x return x
} }
if x := t.Lookup("theme/shortcodes/" + name + ".html"); x != nil {
return x
}
return t.Lookup("_internal/shortcodes/" + name + ".html") return t.Lookup("_internal/shortcodes/" + name + ".html")
} }