mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
Add shortcode template loading from themes directory.
This commit is contained in:
@@ -150,6 +150,9 @@ func GetTemplate(name string, t Template) *template.Template {
|
||||
if x := t.Lookup("shortcodes/" + name + ".html"); x != nil {
|
||||
return x
|
||||
}
|
||||
if x := t.Lookup("theme/shortcodes/" + name + ".html"); x != nil {
|
||||
return x
|
||||
}
|
||||
return t.Lookup("_internal/shortcodes/" + name + ".html")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user