Compare commits

...

2 Commits

Author SHA1 Message Date
Magnus Åhall
715ac03c3b Bumped to v3 2024-05-01 21:35:20 +02:00
Magnus Åhall
1b888a3513 Fixed bug with funcmap in prod mode 2024-05-01 21:35:06 +02:00

View File

@ -23,7 +23,7 @@ import (
"time"
)
const VERSION = "v2"
const VERSION = "v3"
var (
logger *slog.Logger
@ -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()