Started working on test edit page; removed nodemon because it wasn't working

This commit is contained in:
2025-07-02 17:34:06 -04:00
parent 3fa86ad23d
commit 6434fd0b9c
9 changed files with 101 additions and 142 deletions

12
main.go
View File

@ -1,6 +1,7 @@
package main
import (
gotemplate "html/template"
"log"
"net/http"
@ -25,7 +26,16 @@ func main() {
f.Use(flamego.Renderer())
// initialize templating engine
f.Use(template.Templater())
f.Use(template.Templater(template.Options{
FuncMaps: []gotemplate.FuncMap{
{
"contains": web.Contains,
},
},
Directory: "templates",
Extensions: []string{".tmpl", ".html"},
},
))
// inject custom middleware
f.Use(middleware.CustomVars)