diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9df31f8..b4c383d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -29,7 +29,8 @@ {{- template "_internal/opengraph.html" . -}} {{- template "_internal/google_news.html" . -}} {{- template "_internal/schema.html" . -}} - {{- template "_internal/twitter_cards.html" . -}} + + {{- partial "twitter_cards.html" . -}} {{ ` +{{- with $.Params.images -}} + + +{{ else -}} +{{- $images := $.Resources.ByType "image" -}} +{{- $featured := $images.GetMatch "*feature*" -}} +{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} +{{- with $featured -}} + + +{{- else -}} +{{- with $.Site.Params.images -}} + + +{{ else -}} + + +{{- end -}} +{{- end -}} +{{- end }} + + +{{ with .Site.Social.twitter -}} + +{{ end -}} +{{ range .Site.Authors }} +{{ with .twitter -}} + +{{ end -}} +{{ end -}}