blob: e5626cf28c6b4cd29c30fbe65e7d755c3d8e5335 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{{ $date := .Date | time.Format (site.Params.dateformat | default "January 02, 2006") }}
{{ $lastmod := .Lastmod | time.Format (site.Params.dateformat | default "January 02, 2006") }}
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ $date }}
</time>
{{/* Check that lastmod exists and is greater than date
(i.e. the last modified date must be after the publish date) */}}
{{ if and (ne $lastmod $date) (gt .Lastmod .Date) }}
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
({{ i18n "updated_at" }} {{ $lastmod }})
</time>
{{ end }}
|