mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Adding support for embedded templates
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user