From a2f09c8c0de4a347a387d3be5af39f8158799835 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Sat, 12 Oct 2024 16:41:42 -0400 Subject: [PATCH] [PATCH] tpl/tplimpl: Trim descriptions rather than just chomp from https://github.com/gohugoio/hugo/commit/039845804fd545de18a3c4f17f8f7b3ad3bf615b --- layouts/partials/templates/opengraph.html | 4 ++-- layouts/partials/templates/twitter_cards.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 352b2e7c..8c765d13 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -8,8 +8,8 @@ {{- end }} -{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }} - +{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }} + {{- end }} {{- with or .Params.locale site.Language.LanguageCode }} diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html index eab85ac5..bcbc435e 100644 --- a/layouts/partials/templates/twitter_cards.html +++ b/layouts/partials/templates/twitter_cards.html @@ -19,8 +19,8 @@ {{- end }} -{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }} - +{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape }} + {{- end }} {{- $twitterSite := "" }}