diff options
-rw-r--r-- | internal/website/mux.go | 1 | ||||
-rw-r--r-- | templates/page.templ | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/internal/website/mux.go b/internal/website/mux.go index 2d1b971..a6e7ba0 100644 --- a/internal/website/mux.go +++ b/internal/website/mux.go @@ -74,6 +74,7 @@ func NewMux(cfg *config.Config, root string) (mux *http.ServeMux, err error) { if err != nil { return nil, errors.WithMessagef(err, "registering content files") } + templates.Setup() mux.Handle("/", wrapHandler(cfg, func(w http.ResponseWriter, r *http.Request) *HTTPError { urlPath, shouldRedirect := canonicalisePath(r.URL.Path) diff --git a/templates/page.templ b/templates/page.templ index 1667fb0..7869369 100644 --- a/templates/page.templ +++ b/templates/page.templ @@ -11,7 +11,7 @@ var ( css string ) -func init() { +func Setup() { bytes, err := fs.ReadFile(Files, "style.css") if err != nil { panic(err) |