blob: 42747f22239390ce42ca1bd70f4ce9a4921362f9 (
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 }}
|