Legacy Rophako blog index page

This commit is contained in:
Noah 2017-12-23 21:21:26 -08:00
parent 419ae157cc
commit baaf7bcfac

View File

@ -42,6 +42,15 @@ func (b *Blog) BlogRoutes(r *mux.Router) {
r.HandleFunc("/archive", b.BlogArchive) r.HandleFunc("/archive", b.BlogArchive)
r.HandleFunc("/tagged", b.Tagged) r.HandleFunc("/tagged", b.Tagged)
r.HandleFunc("/tagged/{tag}", b.Tagged) r.HandleFunc("/tagged/{tag}", b.Tagged)
r.HandleFunc("/blog/entry/{fragment}", func(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r)
fragment, ok := params["fragment"]
if !ok {
b.NotFound(w, r, "Not Found")
return
}
b.Redirect(w, "/"+fragment)
})
// Login-required routers. // Login-required routers.
loginRouter := mux.NewRouter() loginRouter := mux.NewRouter()