diff options
| author | William Hergès <william@herges.fr> | 2025-09-07 16:48:17 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-09-07 16:48:17 +0200 |
| commit | 26d21b4fa9c703a84b34ceabc13d0d5e19c90e98 (patch) | |
| tree | 9236f03838a61be1f222a6a87827390d62113bd3 /main.go | |
| parent | 996ff551f05dee6db08c8eb4144e7db4a5dbeaa2 (diff) | |
feat(404): better handle
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) } |
