From 64541ef84efbc786271d40acd203e843783b555a Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 19 Jan 2017 16:25:13 +0200 Subject: [PATCH] layouts/partials/opengraph.html: Improve date handling Both the Facebook and OpenGraph documentation specify the usage of article:published_time and article:modified_time tags for articles. For websites, however, the Facebook documentation recommends the og:updated_time tag instead. See: https://developers.facebook.com/docs/reference/opengraph/object-type/article See: http://ogp.me See: https://developers.facebook.com/docs/reference/opengraph/object-type/website --- layouts/partials/opengraph.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index e5e6431..0781c4c 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -6,7 +6,13 @@ {{ end }}{{ end }} -{{ if not .Date.IsZero }}{{ end }}{{ with .Params.audio }} +{{ if .IsPage }} +{{ if not .Date.IsZero }}{{ end }} +{{ if not .Lastmod.IsZero }}{{ end }} +{{ else }} +{{ if not .Site.LastChange.IsZero }}{{ end }} +{{ end }} +{{ with .Params.audio }} {{ end }}{{ with .Params.locale }} {{ end }}{{ with .Site.Params.title }} {{ end }}{{ with .Params.videos }}