diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-09-07 14:55:39 +0000 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-09-07 14:55:39 +0000 |
| commit | 3a809d2571f8df178c436f463c9aade25a34c96e (patch) | |
| tree | 6a4a0485b5650320afe5c1c2e61e9a8987db83a3 /main.go | |
| parent | e8da79df02b9045146e2a0cb9e035f14a68537c6 (diff) | |
| parent | 14f30577f9b5f76d288abce6ba19bf6150936401 (diff) | |
Merge pull request '[Feat] Change tags in now' (#1) from feat/change-tags into main
Reviewed-on: https://git.anhgelus.world/anhgelus/now/pulls/1
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -117,14 +117,14 @@ func main() { "/legal", "Legal things", "", - "Legal information about "+cfg.Person.Name+"'s Now page", + "Legal information about "+cfg.Person.Name+"'s bio", &cfg, ).Handle() - g.NewTemplate("tags", - "/tags", - "Tags", + g.NewTemplate("now", + "/now", + "Now", "", - "Tags of "+cfg.Person.Name+"'s Now page", + ""+cfg.Person.Name+"'s now", &cfg, ).Handle() @@ -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) } @@ -185,9 +193,9 @@ func generateConfigFile(isToml bool) { Name: "John Doe", Pronouns: "any", Image: "pfp.webp", - Tags: []*Tag{ - {"Hello", "World", ""}, - {"I am", "a tag", ""}, + Now: []*Now{ + {"Hello", "World", "", ""}, + {"I am", "a tag", "", ""}, }, }, Color: &Color{ |
