Fix date format in schema and opengraph templates

Fixes #8671
This commit is contained in:
Joe Mooring
2021-06-20 12:30:41 -07:00
committed by Bjørn Erik Pedersen
parent bffa2a2a98
commit 34e4742f0c
4 changed files with 21 additions and 9 deletions

View File

@@ -3,8 +3,8 @@
{{- if .IsPage -}}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
{{ with .PublishDate }}<meta itemprop="datePublished" content="{{ .Format $iso8601 }}" />{{ end}}
{{ with .Lastmod }}<meta itemprop="dateModified" content="{{ .Format $iso8601 }}" />{{ end}}
{{ with .PublishDate }}<meta itemprop="datePublished" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end}}
{{ with .Lastmod }}<meta itemprop="dateModified" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end}}
<meta itemprop="wordCount" content="{{ .WordCount }}">
{{- with $.Params.images -}}