From 03a70161047f33b491b300fbbc76f71ff3d34218 Mon Sep 17 00:00:00 2001 From: Tatsushi Demachi Date: Mon, 20 Jul 2015 09:07:55 +0900 Subject: [PATCH] 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. --- tpl/template.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tpl/template.go b/tpl/template.go index 60fc91746..357a9fbd2 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