mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Adding support for embedded templates
This commit is contained in:
@@ -167,9 +167,18 @@ func NewTemplate() Template {
|
|||||||
}
|
}
|
||||||
|
|
||||||
templates.Funcs(funcMap)
|
templates.Funcs(funcMap)
|
||||||
|
|
||||||
|
templates.LoadEmbedded()
|
||||||
return templates
|
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 {
|
func (t *GoHtmlTemplate) AddTemplate(name, tpl string) error {
|
||||||
_, err := t.New(name).Parse(tpl)
|
_, err := t.New(name).Parse(tpl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user