summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authordemo <demo@antix1>2026-05-07 15:46:26 -0400
committerdemo <demo@antix1>2026-05-07 15:46:26 -0400
commit5aecda4a8006c74e8c912d937fb9b282630bb883 (patch)
tree3f6a60c5e7c6e174476c2816a361f4e9d8415695 /main.go
parent9c1d8f97aae6454d86c6efdfde03e17cf7ea61ed (diff)
feat: implement basic page-infrastructure
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 9 insertions, 0 deletions
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)