projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35d0467
)
Add shortcode template loading from themes directory.
author
Nicholas Whittier
<imperialwicket@gmail.com>
Thu, 26 Jun 2014 20:47:51 +0000
(14:47 -0600)
committer
spf13
<steve.francia@gmail.com>
Mon, 30 Jun 2014 19:22:18 +0000
(15:22 -0400)
hugolib/shortcode.go
patch
|
blob
|
history
diff --git
a/hugolib/shortcode.go
b/hugolib/shortcode.go
index 67204b74079009e122fd3abdedfbf5b40bba2dd4..bfbb1efdb2cfcff35e9cecc1672df4fe3bfe01fc 100644
(file)
--- 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")
}