aboutsummaryrefslogtreecommitdiff
path: root/cmd/site/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/site/main.go')
-rw-r--r--cmd/site/main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/site/main.go b/cmd/site/main.go
index 04d8bc4..391b56b 100644
--- a/cmd/site/main.go
+++ b/cmd/site/main.go
@@ -58,6 +58,7 @@ type Site struct {
Posts blog.Posts
Talks blog.Posts
Resume template.HTML
+ Series []string
rssFeed *feeds.Feed
jsonFeed *jsonfeed.Feed
@@ -81,7 +82,7 @@ func (s *Site) ServeHTTP(w http.ResponseWriter, r *http.Request) {
middleware.RequestID(s.xffmw.Handler(ex.HTTPLog(s.mux))).ServeHTTP(w, r)
}
-var arbDate = time.Date(2019, time.May, 20, 18, 0, 0, 0, time.UTC)
+var arbDate = time.Date(2019, time.September, 12, 0, 0, 0, 0, time.UTC)
// Build creates a new Site instance or fails.
func Build() (*Site, error) {
@@ -147,6 +148,8 @@ func Build() (*Site, error) {
return nil, err
}
s.Posts = posts
+ s.Series = posts.Series()
+ sort.Strings(s.Series)
talks, err := blog.LoadPosts("./talks", "talks")
if err != nil {
@@ -210,6 +213,8 @@ func Build() (*Site, error) {
s.mux.Handle("/blog.atom", middleware.Metrics("blog.atom", http.HandlerFunc(s.createAtom)))
s.mux.Handle("/blog.json", middleware.Metrics("blog.json", http.HandlerFunc(s.createJSONFeed)))
s.mux.Handle("/blog/", middleware.Metrics("blogpost", http.HandlerFunc(s.showPost)))
+ s.mux.Handle("/blog/series", http.HandlerFunc(s.listSeries))
+ s.mux.Handle("/blog/series/", http.HandlerFunc(s.showSeries))
s.mux.Handle("/talks/", middleware.Metrics("talks", http.HandlerFunc(s.showTalk)))
s.mux.Handle("/css/", http.FileServer(http.Dir(".")))
s.mux.Handle("/static/", http.FileServer(http.Dir(".")))