commit 0afcf7ee365d3a77ccf7503dd149c7deeb9e57b6
parent 27755bb9d1b2805c940dbad012190788cc4ed6ab
Author: Lou Woell <lou.woell@posteo.de>
Date:   Sat, 18 Oct 2025 21:55:27 +0200

fix description in socialmedia cards

Diffstat:
Mlayouts/_partials/head.html | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html @@ -1,6 +1,12 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" /> +<meta name="description" + content="{{ if .IsHome }} {{- $.Site.Params.Subtitle -}} + {{ else if .Description }} + {{- .Description | markdownify | plainify -}} + {{ else }} + {{- .Summary | markdownify | plainify -}} + {{ end }}" /> <meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" /> {{ if .Params.noindex }} {{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }} @@ -55,7 +61,12 @@ <meta property="og:locale" content="{{ $.Site.Language.Lang }}" /> <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" /> <meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }}{{ end }}"> -<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" /> +<meta property="og:description" content="{{ if .IsHome }}{{- $.Site.Params.Subtitle -}} +{{ else if .Description}} + {{- .Description | markdownify | plainify -}} +{{ else }} + {{- .Summary | markdownify | plainify -}} +{{ end }}" /> <meta property="og:url" content="{{ .Permalink }}" /> <meta property="og:site_name" content="{{ $.Site.Title }}" /> {{ if (isset .Params "cover") }}