ref: 03a70161047f33b491b300fbbc76f71ff3d34218
parent: e3ea4b48a274770d8a45fe7c1dbbce2340ec4e2d
author: Tatsushi Demachi <[email protected]>
date: Mon Jul 20 05:07:55 EDT 2015
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.
--- a/tpl/template.go
+++ b/tpl/template.go
@@ -82,6 +82,9 @@
localTemplates = &templates.Template
+ for k, v := range funcMap {
+ amber.FuncMap[k] = v
+ }
templates.Funcs(funcMap)
templates.LoadEmbedded()
return templates