diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html index a6e1d05d..eab85ac5 100644 --- a/layouts/partials/templates/twitter_cards.html +++ b/layouts/partials/templates/twitter_cards.html @@ -6,16 +6,22 @@ {{- end}} {{- else }} -{{- $images := partial "templates/_funcs/get-page-images" . -}} -{{- with index $images 0 -}} - - -{{- else -}} - -{{- end -}} +{{- $images := partial "templates/_funcs/get-page-images" . }} +{{- with index $images 0 }} + + +{{- else }} + +{{- end }} +{{- end }} + +{{- with or .Title site.Title site.Params.title | plainify }} + +{{- end }} + +{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }} + {{- end }} - - {{- $twitterSite := "" }} {{- with site.Params.social }}