diff --git a/internal/httpapi/templates.go b/internal/httpapi/templates.go index c28f46e..8f3fbe8 100644 --- a/internal/httpapi/templates.go +++ b/internal/httpapi/templates.go @@ -43,5 +43,5 @@ func (s *Server) render(w http.ResponseWriter, name string, data map[string]any) data["Title"] = strings.Title(base) } w.Header().Set("Content-Type", "text/html; charset=utf-8") - _ = tpl.ExecuteTemplate(w, base, data) + _ = tpl.ExecuteTemplate(w, name, data) } diff --git a/internal/httpapi/templates/layout.tmpl b/internal/httpapi/templates/layout.tmpl index ce2f8bd..d9a8b39 100644 --- a/internal/httpapi/templates/layout.tmpl +++ b/internal/httpapi/templates/layout.tmpl @@ -19,7 +19,7 @@ - {{ template .Content . }} + {{ block "content" . }}{{ end }}