Lastmod is autopopulated from Date if not set.

This commit is contained in:
Fredrik Jonsson 2017-09-01 15:28:44 +02:00
commit 1b0cead11a

View file

@ -26,11 +26,7 @@
{
"title" : {{ .Title | jsonify }},
"date_published" : "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
{{ if .Lastmod -}}
"date_modified" : "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
{{ else -}}
"date_modified" : "{{ .LastMod.Format "2006-01-02T15:04:05Z07:00" }}",
{{ end -}}
"date_modified" : "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
"id" : "{{ .Permalink }}",
"url" : "{{ .Permalink }}",
{{ with .Params.author -}}