[PATCH] Fix date format in schema and opengraph templates

cherry-picked from 34e4742f0c
This commit is contained in:
Joe Mooring 2021-06-20 12:30:41 -07:00 committed by Aditya Telange
parent ddfea82cc7
commit 3a0a4811cb
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@
{{- if .IsPage }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
<meta property="article:section" content="{{ .Section }}" />
{{ with .PublishDate }}<meta property="article:published_time" content="{{ .Format $iso8601 }}" />{{ end }}
{{ with .Lastmod }}<meta property="article:modified_time" content="{{ .Format $iso8601 }}" />{{ end }}
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
{{- end -}}
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}