From 26d21b4fa9c703a84b34ceabc13d0d5e19c90e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sun, 7 Sep 2025 16:48:17 +0200 Subject: feat(404): better handle --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 6df8e79..3f8d3c2 100644 --- a/main.go +++ b/main.go @@ -140,6 +140,14 @@ func main() { } g.NotFoundHandler = func(w http.ResponseWriter, r *http.Request) { + g.Render(w, "404", &golatt.TemplateData{ + Title: "Not found :(", + SEO: &golatt.SeoData{ + URL: r.URL.Path, + Description: "Not found", + }, + Data: &cfg, + }) http.Redirect(w, r, "/", http.StatusTemporaryRedirect) } -- cgit v1.2.3