From 3f20d3cd776ecb6541dcc8b113373eb1533b531d Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Thu, 25 Apr 2024 08:18:40 -0700 Subject: [PATCH] [PATCH] tpl/tplimpl: Plainify title and description in twitter_cards.html from https://github.com/gohugoio/hugo/commit/74ab839ccb397ea9df1c96d71c5347f49f2b231a --- layouts/partials/templates/twitter_cards.html | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) 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 }}