From 607bfbc544b6b6d8a6b3d6ca665bf005144fbc37 Mon Sep 17 00:00:00 2001 From: Reorx Date: Thu, 5 May 2022 11:11:43 +0800 Subject: [PATCH] reindent twitter_cards --- layouts/partials/templates/twitter_cards.html | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html index 7716bb5..bc744b2 100644 --- a/layouts/partials/templates/twitter_cards.html +++ b/layouts/partials/templates/twitter_cards.html @@ -1,33 +1,34 @@ {{- if .Params.cover.image -}} - -{{- if (eq .Params.cover.absolute true) }} - + + {{- if (eq .Params.cover.absolute true) }} + + {{- else }} + + {{- end}} {{- else }} - -{{- end}} -{{- else }} -{{- 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 $.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 }} {{- end }} + {{ with site.Social.twitter -}} - + {{ end -}}