summaryrefslogtreecommitdiffstats
path: root/tpl
diff options
context:
space:
mode:
authorAlan Orth <alan.orth@gmail.com>2017-02-21 15:18:59 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-02-21 14:41:09 +0100
commiteb27c47fc5102e05945f3beb892a839284d56dc8 (patch)
treee4d95f47ea3f55c9eacf025589764931ce64751e /tpl
parentdf1ff57d1aee4bf3d9cc56327fd00522754938d9 (diff)
tpl: Use og:updated_time OpenGraph tag on nodes
A previous commit greatly improved the OpenGraph tags generated by Hugo's internal opengraph template, but there was a minor error in the fix. Nodes are of type "website" and according to the Facebook docs they should use og:updated_time. See: https://github.com/spf13/hugo/pull/2979 See: https://developers.facebook.com/docs/reference/opengraph/object-type/website/
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/template_embedded.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go
index 44bd76189..74bf0a4df 100644
--- a/tpl/tplimpl/template_embedded.go
+++ b/tpl/tplimpl/template_embedded.go
@@ -172,7 +172,7 @@ func (t *GoHTMLTemplate) EmbedTemplates() {
{{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
{{ if not .Lastmod.IsZero }}<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
{{ else }}
-{{ if not .Date.IsZero }}<meta property="article:modified_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
+{{ if not .Date.IsZero }}<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
{{ end }}{{ with .Params.audio }}
<meta property="og:audio" content="{{ . }}" />{{ end }}{{ with .Params.locale }}
<meta property="og:locale" content="{{ . }}" />{{ end }}{{ with .Site.Params.title }}