Commit ea5c2146 authored by Jamie Tanna's avatar Jamie Tanna

Show event start + address in sharing metadata for events

As part of jvt.me#401, it'd be nicer to have more useful sharing
metadata for events, such as easily being able to see the start time +
address.
parent cc687eae
......@@ -61,6 +61,14 @@
{{ else }}
<meta name="twitter:data1" value="{{ .ReadingTime }} mins" />
{{ end }}
{{ end }}
{{- if (eq .Type "events") -}}
<meta name="twitter:label1" value="Start time" />
<meta name="twitter:data1" value="{{ dateFormat "Mon, 02 Jan 2006 15:04:05 MST" .Params.Start }}" />
{{ if .Params.Adr }}
<meta name="twitter:label2" value="Address" />
<meta name="twitter:data2" value="{{ .Params.adr.street_address }}, {{ .Params.adr.locality }}, {{ .Params.adr.postal_code }}" />
{{ end }}
{{- end -}}
<meta name="twitter:image" content="{{ $imageUrl }}" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment