From: Kaushal Modi Date: Thu, 8 Feb 2018 21:32:49 +0000 (-0500) Subject: Use more canonical "twitter:image" property, not "twitter:image:src" X-Git-Tag: v0.37~41 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=76d38d5e5;p=brevno-suite%2Fhugo Use more canonical "twitter:image" property, not "twitter:image:src" This change is made in the "twitter_cards" internal template. References: - https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary-card-with-large-image - https://twittercommunity.com/t/twitter-image-src-or-twitter-image/16085/7 --- diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go index b54a4bbe..627d4dc4 100644 --- a/tpl/tplimpl/template_embedded.go +++ b/tpl/tplimpl/template_embedded.go @@ -233,18 +233,18 @@ func (t *templateHandler) embedTemplates() { t.addInternalTemplate("", "twitter_cards.html", `{{- with $.Params.images -}} - + {{ else -}} {{- $images := $.Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}} {{- with $featured -}} - + {{- else -}} {{- with $.Site.Params.images -}} - + {{ else -}} {{- end -}}