mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-14 16:27:04 +01:00
Merge pull request #111 from TommySprat/dateformat-escape-fix
Do not escape characters in formatted date
This commit is contained in:
commit
63e36db2d5
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
||||||
{{- if not .Date.IsZero }}
|
{{- if not .Date.IsZero }}
|
||||||
"dateModified": "{{ .Date.Format $ISO8601 }}",
|
"dateModified": {{ .Date.Format $ISO8601 }},
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Site.Social.GooglePlus }}
|
{{- with .Site.Social.GooglePlus }}
|
||||||
"publisher": "{{ printf "%s" . }}",
|
"publisher": "{{ printf "%s" . }}",
|
||||||
|
@ -25,12 +25,12 @@
|
|||||||
"wordCount": "{{ .WordCount }}",
|
"wordCount": "{{ .WordCount }}",
|
||||||
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
|
||||||
{{- if not .PublishDate.IsZero }}
|
{{- if not .PublishDate.IsZero }}
|
||||||
"datePublished": "{{ .PublishDate.Format $ISO8601 }}",
|
"datePublished": {{ .PublishDate.Format $ISO8601 }},
|
||||||
{{- else }}
|
{{- else }}
|
||||||
"datePublished": "{{ .Date.Format $ISO8601 }}",
|
"datePublished": {{ .Date.Format $ISO8601 }},
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not .Lastmod.IsZero }}
|
{{- if not .Lastmod.IsZero }}
|
||||||
"dateModified": "{{ .Lastmod.Format $ISO8601 }}",
|
"dateModified": {{ .Lastmod.Format $ISO8601 }},
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Site.Social.GooglePlus }}
|
{{- with .Site.Social.GooglePlus }}
|
||||||
"publisher": "{{ printf "%s" . }}",
|
"publisher": "{{ printf "%s" . }}",
|
||||||
|
Loading…
Reference in New Issue
Block a user