mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
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:
committed by
Bjørn Erik Pedersen
parent
e3ea4b48a2
commit
03a7016104
@@ -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
|
||||
|
Reference in New Issue
Block a user