aboutsummaryrefslogtreecommitdiff
path: root/backend/home.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 17:36:27 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 17:36:27 +0200
commitdfca0f5bbebfe11d9c5d8bf6584bd1bf80d62274 (patch)
treee033bb57affecf03fc03b678b3a876377441de9f /backend/home.go
parenta471baf6ee1b1a05acec23f2de1b74f56f4596a5 (diff)
feat(backend): og and twitter seo
Diffstat (limited to 'backend/home.go')
-rw-r--r--backend/home.go15
1 files changed, 9 insertions, 6 deletions
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")
})
}