Let Amber template call Hugo's custom functions

Amber doesn't share text/template `FuncMap` functions and has its own
function list. This allows Amber to call Hugo's custom functions.
This commit is contained in:
Tatsushi Demachi authored and Bjørn Erik Pedersen committed 2015-07-20 11:29:15 +02:00
1 parent e3ea4b48a2
commit 03a7016104
1 file changed
+3
+3
View File
@@ -82,6 +82,9 @@ func New() Template {
localTemplates = &templates.Template localTemplates = &templates.Template
for k, v := range funcMap {
amber.FuncMap[k] = v
}
templates.Funcs(funcMap) templates.Funcs(funcMap)
templates.LoadEmbedded() templates.LoadEmbedded()
return templates return templates