From 64d8bdab83fd866d2b77c40f32c1c02540946b7f Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sun, 22 Jan 2017 15:48:21 +0200 Subject: [PATCH] layouts/partials/opengraph.html: Work on OpenGraph tags Better use of dates for ALL nodes/pages. I wrote extensive comments as a note for when I eventually submit this upstream to Hugo. --- layouts/partials/opengraph.html | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index aec9bd3..5d276de 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -1,3 +1,24 @@ + @@ -7,7 +28,8 @@ {{ end }}{{ end }} {{ if .IsPage }} -{{ if not .Date.IsZero }}{{ end }} +{{ if not .PublishDate.IsZero }} +{{ else if not .Date.IsZero }}{{ end }} {{ if not .Lastmod.IsZero }}{{ end }} {{ else }} {{ if not .Site.LastChange.IsZero }}{{ end }} @@ -33,8 +55,6 @@ {{ range .Site.Authors }}{{ with .Social.facebook }} {{ end }}{{ with .Site.Social.facebook }} {{ end }} - - {{ with .Params.tags }}{{ range first 6 . }} {{ end }}{{ end }}