Fixed bug with funcmap in prod mode

This commit is contained in:
Magnus Åhall 2024-05-01 21:34:57 +02:00
parent 6c3310b83d
commit 1b888a3513

View File

@ -264,7 +264,7 @@ func getPage(layout, page string) (tmpl *template.Template, err error) { // {{{
if flagDev {
tmpl, err = template.New("main.gotmpl").Funcs(funcMap).ParseFS(os.DirFS("."), filenames...)
} else {
tmpl, err = template.New("main.gotmpl").ParseFS(viewFS, filenames...)
tmpl, err = template.New("main.gotmpl").Funcs(funcMap).ParseFS(viewFS, filenames...)
}
if err != nil {
err = we.Wrap(err).Log()