add single article page

This commit is contained in:
2025-01-12 19:57:54 +01:00
parent de32cef530
commit 9104bc7716
7 changed files with 132 additions and 9 deletions

View File

@@ -24,6 +24,8 @@ func (app *App) Routes() http.Handler {
mux.Handle("GET /page/{id}", http.HandlerFunc(app.Index))
mux.Handle("POST /up/search", http.HandlerFunc(app.UpSearch))
mux.Handle("GET /article/{id}", http.HandlerFunc(app.Article))
// serve files from the "static" directory
mux.Handle("GET /static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./assets/static"))))