handle nested templates

This commit is contained in:
ethan merchant 2024-11-03 02:06:07 -05:00
parent dc7cc9e7dc
commit 3c182fc1df

View file

@ -11,7 +11,8 @@ var (
) )
func Load() { func Load() {
Templates = template.Must(template.ParseGlob("tem/html/*.html")) func_map := template.FuncMap{}
Templates = template.Must(template.New("").Funcs(func_map).ParseGlob("tem/html/**/*.html"))
fmt.Println("templates loaded") fmt.Println("templates loaded")
} }