From 3ed38031bed7b2b9ec36b90b2b099a761faee61a Mon Sep 17 00:00:00 2001 From: Thomas Cravey Date: Sun, 17 Aug 2025 13:20:17 -0500 Subject: [PATCH] fix(webui): blank page regression; execute named templates (dashboard.tmpl, summarizer.tmpl) in render() --- internal/httpapi/templates.go | 2 +- internal/httpapi/templates/layout.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }}