oops
This commit is contained in:
parent
a6a874b6a8
commit
e4d7c3c269
|
@ -175,19 +175,20 @@ func (s *Site) showPost(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
const dateFormat = `2006-01-02`
|
const dateFormat = `2006-01-02`
|
||||||
s.renderTemplatePage("blogpost.html", struct {
|
s.renderTemplatePage("blogpost.html", struct {
|
||||||
Title string
|
Title string
|
||||||
Link string
|
Link string
|
||||||
BodyHTML template.HTML
|
BodyHTML template.HTML
|
||||||
Date string
|
Date string
|
||||||
Series string
|
Series, SeriesTag string
|
||||||
Tags string
|
Tags string
|
||||||
}{
|
}{
|
||||||
Title: p.Title,
|
Title: p.Title,
|
||||||
Link: p.Link,
|
Link: p.Link,
|
||||||
BodyHTML: p.BodyHTML,
|
BodyHTML: p.BodyHTML,
|
||||||
Date: p.Date.Format(dateFormat),
|
Date: p.Date.Format(dateFormat),
|
||||||
Series: strings.ReplaceAll(p.Series, "-", ""),
|
Series: p.Series,
|
||||||
Tags: tags,
|
SeriesTag: strings.ReplaceAll(p.Series, "-", ""),
|
||||||
|
Tags: tags,
|
||||||
}).ServeHTTP(w, r)
|
}).ServeHTTP(w, r)
|
||||||
postView.With(prometheus.Labels{"base": filepath.Base(p.Link)}).Inc()
|
postView.With(prometheus.Labels{"base": filepath.Base(p.Link)}).Inc()
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ function share_on_mastodon() {
|
||||||
// Hashtags
|
// Hashtags
|
||||||
var hashtags = "#blogpost";
|
var hashtags = "#blogpost";
|
||||||
|
|
||||||
{{ if ne .Series "" }}hashtags += " #{{ .Series }}";{{ end }}
|
{{ if ne .SeriesTag "" }}hashtags += " #{{ .SeriesTag }}";{{ end }}
|
||||||
{{ if ne .Tags "" }}hashtags += "{{ .Tags }}";{{ end }}
|
{{ if ne .Tags "" }}hashtags += "{{ .Tags }}";{{ end }}
|
||||||
|
|
||||||
// Tagging users, such as offical accounts or the author of the post
|
// Tagging users, such as offical accounts or the author of the post
|
||||||
|
|
Loading…
Reference in New Issue