diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 7b2d7b8921..2998400e1d 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -47,7 +47,7 @@ {{ partial "pageHelper/title.hugo" (dict "page" . "format" $format "outputFormat" $outputFormat) }} {{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }} - {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ (or .PublishDate .Date).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} {{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }} {{ or .Description .Summary | plainify | htmlUnescape | chomp | transform.XMLEscape | safeHTML }} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index 20ff74e361..f6d6ed777f 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -29,7 +29,7 @@ {{- end }} {{- $iso8601 := "2006-01-02T15:04:05-07:00" }} - {{- with .PublishDate }} + {{- with or .PublishDate .Date }} {{- end }} {{- with .Lastmod }} diff --git a/layouts/partials/schema.html b/layouts/partials/schema.html index 9bbca1fe10..79db6ffa13 100644 --- a/layouts/partials/schema.html +++ b/layouts/partials/schema.html @@ -10,7 +10,7 @@ {{- end }} {{- $ISO8601 := "2006-01-02T15:04:05-07:00" }} -{{- with .PublishDate }} +{{- with or .PublishDate .Date }} {{- end }}