diff options
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/logs.go | 3 | ||||
| -rw-r--r-- | backend/templates/components.html | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/backend/logs.go b/backend/logs.go index 7a6db3e..db69462 100644 --- a/backend/logs.go +++ b/backend/logs.go @@ -108,9 +108,10 @@ func readLogDir(path string, dir []os.DirEntry) error { } func HandleLogs(r *chi.Mux) { - r.Route("/log", func(r chi.Router) { + r.Route("/logs", func(r chi.Router) { r.Get("/", handleLogList) r.Get("/{slug:[a-zA-Z0-9-]+}", handleLog) + r.Get("/{slug:[a-zA-Z0-9-]+}/", handleLog) }) } diff --git a/backend/templates/components.html b/backend/templates/components.html index 280fa3d..2758a8b 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -2,9 +2,9 @@ <article> {{ range .Logs }} <article> - <h2><a href="/log/{{ .Slug }}">{{ .Title }}</a></h2> + <h2><a href="/logs/{{ .Slug }}">{{ .Title }}</a></h2> <figure> - <a href="/log/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}"></a> + <a href="/logs/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}"></a> <figcaption>{{ .Img.Legend }}</figcaption> </figure> <p>{{ .Description }}</p> |
