Remove escape characters in formatted date

Without the quotes in the template the '+' character will no longer
needlessly be escaped as '\x2b'
This commit is contained in:
TommySprat 2019-06-13 00:07:36 +02:00
parent 4ab2e0da8c
commit c1b3e978b7
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
},
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{- if not .Date.IsZero }}
"dateModified": "{{ .Date.Format $ISO8601 }}",
"dateModified": {{ .Date.Format $ISO8601 }},
{{- end }}
{{- with .Site.Social.GooglePlus }}
"publisher": "{{ printf "%s" . }}",

View File

@ -25,12 +25,12 @@
"wordCount": "{{ .WordCount }}",
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{- if not .PublishDate.IsZero }}
"datePublished": "{{ .PublishDate.Format $ISO8601 }}",
"datePublished": {{ .PublishDate.Format $ISO8601 }},
{{- else }}
"datePublished": "{{ .Date.Format $ISO8601 }}",
"datePublished": {{ .Date.Format $ISO8601 }},
{{- end }}
{{- if not .Lastmod.IsZero }}
"dateModified": "{{ .Lastmod.Format $ISO8601 }}",
"dateModified": {{ .Lastmod.Format $ISO8601 }},
{{- end }}
{{- with .Site.Social.GooglePlus }}
"publisher": "{{ printf "%s" . }}",