diff options
| author | Christine Dodrill <me@christine.website> | 2019-09-12 22:56:43 +0000 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2019-09-12 22:56:43 +0000 |
| commit | e4d7c3c2691acad73d6240ff0c9b208273b95997 (patch) | |
| tree | 3cc2b9ca811ab392911d157cdc7e6a0fa081ee10 /cmd | |
| parent | a6a874b6a89eacde2de216444a8cad2ea78b0e0e (diff) | |
| download | xesite-e4d7c3c2691acad73d6240ff0c9b208273b95997.tar.xz xesite-e4d7c3c2691acad73d6240ff0c9b208273b95997.zip | |
oops
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/site/html.go | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/cmd/site/html.go b/cmd/site/html.go index a1d5040..c91216c 100644 --- a/cmd/site/html.go +++ b/cmd/site/html.go @@ -175,19 +175,20 @@ func (s *Site) showPost(w http.ResponseWriter, r *http.Request) { const dateFormat = `2006-01-02` s.renderTemplatePage("blogpost.html", struct { - Title string - Link string - BodyHTML template.HTML - Date string - Series string - Tags string + Title string + Link string + BodyHTML template.HTML + Date string + Series, SeriesTag string + Tags string }{ - Title: p.Title, - Link: p.Link, - BodyHTML: p.BodyHTML, - Date: p.Date.Format(dateFormat), - Series: strings.ReplaceAll(p.Series, "-", ""), - Tags: tags, + Title: p.Title, + Link: p.Link, + BodyHTML: p.BodyHTML, + Date: p.Date.Format(dateFormat), + Series: p.Series, + SeriesTag: strings.ReplaceAll(p.Series, "-", ""), + Tags: tags, }).ServeHTTP(w, r) postView.With(prometheus.Labels{"base": filepath.Base(p.Link)}).Inc() } |
