From a5e7eceaa8cc5f3be23e2bed4197dd623f944277 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 1 Aug 2020 19:57:46 +0200 Subject: [PATCH] include custom twitter-card metadata --- CHANGELOG.md | 4 +--- layouts/partials/head/microformats.html | 28 ++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7880efd..5abbc45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,2 @@ -- BUGFIX - - fix default atom feed include - ENHANCEMENT - - increase contrast ratio on feature image overlay + - include custom twitter-card metadata and switch to `summary` instead of `summary_large_image` diff --git a/layouts/partials/head/microformats.html b/layouts/partials/head/microformats.html index 47183f7..4b1a04a 100644 --- a/layouts/partials/head/microformats.html +++ b/layouts/partials/head/microformats.html @@ -1,2 +1,28 @@ {{ template "_internal/opengraph.html" . }} -{{ template "_internal/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 -}} + +{{- end -}} +{{- end -}} +{{- end }} + + + +{{ with .Site.Social.twitter -}} + +{{ end -}} +{{ range .Site.Authors }} +{{ with .twitter -}} + +{{ end -}} +{{ end -}}