mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02: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 {
|
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")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user