Use RFC3339 format for datetime property

This commit is contained in:
vimux 2019-11-21 10:35:22 -05:00
parent 077ae0345e
commit b8d4e82d00
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34

View file

@ -1,6 +1,10 @@
{{- if not .Date.IsZero }} {{- if not .Date.IsZero }}
<time class="post__meta-published meta-published" datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format ( .Site.Params.dateFormat | default "January 02, 2006" ) }}</time> <time class="post__meta-published meta-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{- .Date.Format (.Site.Params.dateFormat | default "January 02, 2006") -}}
</time>
{{- end }} {{- end }}
{{- if ne .Date .Lastmod }} {{- if ne .Date .Lastmod }}
<time class="post__meta-lastmod meta-lastmod" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05" }}">{{ T "meta_lastmod" }}: {{ .Lastmod.Format ( .Site.Params.dateFormat | default "January 02, 2006" ) }}</time> <time class="post__meta-lastmod meta-lastmod" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
{{- T "meta_lastmod" }}: {{ .Lastmod.Format (.Site.Params.dateFormat | default "January 02, 2006") -}}
</time>
{{- end }} {{- end }}