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()
}
diff --git a/templates/blogpost.html b/templates/blogpost.html
index 00cd399..c4953a9 100644
--- a/templates/blogpost.html
+++ b/templates/blogpost.html
@@ -99,7 +99,7 @@ function share_on_mastodon() {
// Hashtags
var hashtags = "#blogpost";
- {{ if ne .Series "" }}hashtags += " #{{ .Series }}";{{ end }}
+ {{ if ne .SeriesTag "" }}hashtags += " #{{ .SeriesTag }}";{{ end }}
{{ if ne .Tags "" }}hashtags += "{{ .Tags }}";{{ end }}
// Tagging users, such as offical accounts or the author of the post