aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 8 insertions, 0 deletions
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)
}