diff options
Diffstat (limited to 'cmd/server/handlers.go')
| -rw-r--r-- | cmd/server/handlers.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/server/handlers.go b/cmd/server/handlers.go index 60e0a35..02fb712 100644 --- a/cmd/server/handlers.go +++ b/cmd/server/handlers.go @@ -11,6 +11,13 @@ import ( type App struct { ReIndexPath string StaticDirectory string + + // Related to the Atom feed + Title string + Description string // aka, "subtitle" + Author Author + FeedId string + Updated page.PageTime } func (a *App) PageHandler(w http.ResponseWriter, r *http.Request) { @@ -48,6 +55,7 @@ func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request) { rtr := mux.NewRouter() rtr.HandleFunc(a.ReIndexPath, a.RebuildIndexHandler) rtr.PathPrefix("/static/").Handler(a.StaticHandler()) + rtr.PathPrefix("/.feeds/{tag}").HandlerFunc(a.FeedHandler) rtr.PathPrefix("/").HandlerFunc(a.PageHandler) rtr.ServeHTTP(w, r) } |
