From 76d38d5e5322fc6220fb9e74f9ca0668606ebb5d Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Thu, 8 Feb 2018 16:32:49 -0500 Subject: [PATCH] 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 --- tpl/tplimpl/template_embedded.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tpl/tplimpl/template_embedded.go b/tpl/tplimpl/template_embedded.go index b54a4bbec..627d4dc4d 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 -}}