Commit a0a103ba authored by Jamie Tanna's avatar Jamie Tanna

Fix: Mentions don't always have a `published` date

It looks like sometimes a mention may not have a `published` date which
blows our existing templating up as it's expecting it to be there, and
if not, it can't convert it to the right date format (expectedly).
parent e9e8541c
......@@ -4,7 +4,10 @@
<ul>
{{ range . }}
<li>
<a href="{{ .author.url }}">{{ .author.name }}</a> mentioned this post at <a href="{{ .url }}">{{ .url }}</a> on {{ dateFormat "02 January 2006" .published }}.
<a href="{{ .author.url }}">{{ .author.name }}</a> mentioned this post at <a href="{{ .url }}">{{ .url }}</a>
{{ if .published }}
on {{ dateFormat "02 January 2006" .published }}
{{ end }}.
</li>
{{ end }}
</ul>
......
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