mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 23:12:10 -05:00
Adding support for embedded templates
This commit is contained in:
parent
f78e2cb854
commit
13b067b506
1 changed files with 173 additions and 164 deletions
|
@ -167,9 +167,18 @@ func NewTemplate() Template {
|
|||
}
|
||||
|
||||
templates.Funcs(funcMap)
|
||||
|
||||
templates.LoadEmbedded()
|
||||
return templates
|
||||
}
|
||||
|
||||
func (t *GoHtmlTemplate) LoadEmbedded() {
|
||||
}
|
||||
|
||||
func (t *GoHtmlTemplate) AddInternalTemplate(prefix, name, tpl string) error {
|
||||
return t.AddTemplate("_internal/"+prefix+"/"+name, tpl)
|
||||
}
|
||||
|
||||
func (t *GoHtmlTemplate) AddTemplate(name, tpl string) error {
|
||||
_, err := t.New(name).Parse(tpl)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue