From: Nicholas Whittier Date: Thu, 26 Jun 2014 20:47:51 +0000 (-0600) Subject: Add shortcode template loading from themes directory. X-Git-Tag: v0.12~77 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ac99ceccac3511f2d4f3c642dfd3b844ba28f900;p=brevno-suite%2Fhugo Add shortcode template loading from themes directory. --- diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 67204b74..bfbb1efd 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -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") }