From 5aecda4a8006c74e8c912d937fb9b282630bb883 Mon Sep 17 00:00:00 2001 From: demo Date: Thu, 7 May 2026 15:46:26 -0400 Subject: feat: implement basic page-infrastructure --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index c185441..f070c9b 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "flag" + "html/template" "io" "log" "net/http" @@ -36,6 +37,14 @@ func main() { log.Fatal(err) } + // Set up all the templates needed for the story arcs. + indexTmpl, err := template.ParseGlob("views/*.gohtml") + if err != nil { + log.Fatal(err) + } + + cfg.Template = indexTmpl + // Set up the handlers and server. mux := http.NewServeMux() mux.Handle("/{arc}", &cfg) -- cgit v1.2.3