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 2015-07-20 09:07:55 +09:00 committed by Bjørn Erik Pedersen
parent e3ea4b48a2
commit 03a7016104

View file

@ -82,6 +82,9 @@ func New() Template {
localTemplates = &templates.Template
for k, v := range funcMap {
amber.FuncMap[k] = v
}
templates.Funcs(funcMap)
templates.LoadEmbedded()
return templates