From dfca0f5bbebfe11d9c5d8bf6584bd1bf80d62274 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 2 Oct 2025 17:36:27 +0200 Subject: feat(backend): og and twitter seo --- backend/home.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'backend/home.go') diff --git a/backend/home.go b/backend/home.go index 8577fec..a7f2ae1 100644 --- a/backend/home.go +++ b/backend/home.go @@ -1,18 +1,21 @@ package backend import ( - "html/template" "net/http" "github.com/go-chi/chi/v5" ) func HandleHome(r *chi.Mux) { - r.Get("/", func(w http.ResponseWriter, r *http.Request) { - t := template.Must(template.ParseFS(templates, "templates/home.html", "templates/base.html")) - err := t.ExecuteTemplate(w, "base.html", &data{}) - if err != nil { - panic(err) + r.Get("/", func(w http.ResponseWriter, _ *http.Request) { + d := &data{ + title: "", + Article: false, + Domain: "anhgelus.world", + URL: "/", + Image: "", + Description: "", } + d.handleGeneric(w, "home") }) } -- cgit v1.2.3