mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-24 03:23:37 +00: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:
parent
e3ea4b48a2
commit
03a7016104
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue