mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Add shortcode template loading from themes directory.
This commit is contained in:
parent
35d04671d3
commit
ac99ceccac
1 changed files with 3 additions and 0 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue