Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit 1a9e314

Browse files
committed
Add flavor text for title in event feed
1 parent 3e9292c commit 1a9e314

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

layouts/section/events.rss.xml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,27 @@
2222
{{- if .startdate -}}
2323
{{- if ge (dateFormat "2006-01-02" .enddate) (dateFormat "2006-01-02" (dateFormat "2006-01-02" now)) -}}
2424
<item>
25-
<title>devopsdays {{ .city }} {{ .year }}</title>
25+
{{- if eq .startdate .enddate -}}
26+
<title>devopsdays {{ .city }} {{ .year }} is coming! {{ dateFormat "Monday, January 2, 2006" .startdate }}</title>
27+
{{- else -}}
28+
<title>devopsdays {{ .city }} {{ .year }} is coming! {{ dateFormat "Monday, January 2, 2006" .startdate }} - {{ dateFormat "Monday, January 2, 2006" .enddate }}</title>
29+
{{- end -}}
2630
<link>{{ (printf "events/%s" .name) | absURL }}</link>
2731
<guid>{{ (printf "events/%s" .name) | absURL }}</guid>
2832
<pubDate>{{ dateFormat "Mon, 2 Jan 2006 15:04:05 -0700" now }}</pubDate>
29-
{{ if .description }}
33+
{{- if .description -}}
3034
<description>{{.description | markdownify | htmlEscape}}</description>
31-
{{ else }}
32-
{{ if eq .startdate .enddate }}
33-
<description>devopsdays {{ .city }} {{ .year }} will be taking place {{ dateFormat "Mon, 2 Jan 2006" .startdate }}.</description>
34-
{{ else }}
35-
<description>devopsdays {{ .city }} {{ .year }} will be taking place {{ dateFormat "Mon, 2 Jan 2006" .startdate }} through {{ dateFormat "Mon, 2 Jan 2006" .enddate }}.</description>
36-
{{ end }}
37-
{{ end }}
35+
{{- else -}}
36+
{{- if eq .startdate .enddate -}}
37+
<description>devopsdays {{ .city }} {{ .year }} will be taking place {{ dateFormat "Monday, January 2, 2006" .startdate }}.</description>
38+
{{- else -}}
39+
<description>devopsdays {{ .city }} {{ .year }} will be taking place {{ dateFormat "Monday, January 2, 2006" .startdate }} through {{ dateFormat "Monday, January 2, 2006" .enddate }}.</description>
40+
{{- end -}}
41+
{{- end -}}
3842
</item>
39-
{{ end }}
40-
{{ end }}
41-
{{ end }}
43+
{{- end -}}
44+
{{- end -}}
45+
{{- end -}}
4246

4347
</channel>
4448

0 commit comments

Comments
 (0)