commit 5afb90c1b5df9544adfe84e1f3627a2ae59fe1ad parent 2f2b6cb70c4237cb090abc097bdffbd90fba4081 Author: Lou Woell <lou.woell@posteo.de> Date: Sat, 13 Dec 2025 18:26:49 +0100 partial head: whitespace Diffstat:
| M | layouts/_partials/head.html | | | 44 | ++++++++++++++++++++------------------------ |
1 file changed, 20 insertions(+), 24 deletions(-)
diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html @@ -51,19 +51,19 @@ <link rel="apple-touch-icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}"> {{- end }} <!-- OG data --> -<meta property="og:locale" content="{{ $.Site.Language.Lang }}" /> +<meta property="og:locale" content="{{ $.Site.Language.Lang }}"/> <meta property="og:type" content=" {{- if .IsPage -}} article {{- else -}} website - {{- end }}" /> + {{- end }}"/> <meta property="og:title" content=" {{- if .IsHome -}} {{- $.Site.Title -}} {{- else -}} {{- .Title -}} - {{- end }}"> + {{- end }}"/> <meta property="og:description" content=" {{- if .IsHome -}} {{- $.Site.Params.Subtitle -}} @@ -71,39 +71,35 @@ {{- .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") -}} - {{- $pageCover := .Param "cover" -}} - {{- with (.Resources.GetMatch (.Param "cover")) -}} - {{- $pageCover = .RelPermalink }} - {{- end -}} - <meta property="og:image" content="{{ $pageCover | absURL }}"> +{{- end }}"/> +<meta property="og:url" content="{{ .Permalink }}"/> +<meta property="og:site_name" content="{{ .Site.Title }}"/> +<meta property="og:image" content= {{- with (.Params.cover | .Resources.GetMatch) -}} + "{{ .RelPermalink | absURL }}" {{- else -}} - {{- if isset $.Site.Params "favicon" -}} - <meta property="og:image" content="{{ $.Site.Params.favicon | absURL }}"> - {{- else -}} - <meta property="og:image" content="{{ printf "img/theme-colors/%s.png" $.Site.Params.ThemeColor | absURL }}"> - {{- end -}} -{{- end }} -<meta property="og:image:width" content="1200"> -<meta property="og:image:height" content="627"> + {{- if .Site.Params.favicon -}} + "{{ .Site.Params.favicon | absURL }}" + {{- else -}} + "{{ printf "img/theme-colors/%s.png" .Site.Params.ThemeColor | absURL }}" + {{- end -}} +{{ end -}}/> +<meta property="og:image:width" content="1200"/> +<meta property="og:image:height" content="627"/> {{ range .Params.categories -}} - <meta property="article:section" content="{{ . }}" /> + <meta property="article:section" content="{{ . }}"/> {{- end }} {{ if isset .Params "date" -}} - <meta property="article:published_time" content="{{ time .Date }}" /> + <meta property="article:published_time" content="{{ time .Date }}"/> {{- end -}} <!-- RSS --> {{ with .OutputFormats.Get "RSS" -}} - <link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" /> + <link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}"/> {{- end }} <!-- JSON Feed --> {{ with .OutputFormats.Get "json" -}} - <link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" /> + <link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}"/> {{- end }} {{- partial "ld_schema" . -}}