Add shortcode template loading from themes directory.
authorNicholas Whittier <imperialwicket@gmail.com>
Thu, 26 Jun 2014 20:47:51 +0000 (14:47 -0600)
committerspf13 <steve.francia@gmail.com>
Mon, 30 Jun 2014 19:22:18 +0000 (15:22 -0400)
hugolib/shortcode.go

index 67204b74079009e122fd3abdedfbf5b40bba2dd4..bfbb1efdb2cfcff35e9cecc1672df4fe3bfe01fc 100644 (file)
@@ -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")
 }