From: Tatsushi Demachi Date: Mon, 20 Jul 2015 00:07:55 +0000 (+0900) Subject: Let Amber template call Hugo's custom functions X-Git-Tag: v0.15~280 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=03a70161047f33b491b300fbbc76f71ff3d34218;p=brevno-suite%2Fhugo 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. --- diff --git a/tpl/template.go b/tpl/template.go index 60fc9174..357a9fbd 100644 --- a/tpl/template.go +++ b/tpl/template.go @@ -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