diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -50,6 +50,10 @@ func main() { if err != nil { panic(err) } + customPages, err := cfg.LoadCustomPages() + if err != nil { + panic(err) + } g := golatt.New(templates) g.DefaultSeoData = &golatt.SeoData{ Image: cfg.Image, @@ -74,6 +78,16 @@ func main() { &cfg). Handle() + for _, cp := range customPages { + g.NewTemplate("custom_page", + cp.URI, + cp.Title, + cp.Image, + cp.Description, + cp). + Handle() + } + g.NotFoundHandler = func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "/", http.StatusTemporaryRedirect) } |
