From 4df57c1779c65203199524db70564a5cb75c31dd Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 29 May 2024 16:44:07 +0200 Subject: [PATCH] Fix template issue --- .../layouts/partials/head/open_graph.html | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/themes/mastodon/layouts/partials/head/open_graph.html b/themes/mastodon/layouts/partials/head/open_graph.html index 9353b44..3cbc67b 100644 --- a/themes/mastodon/layouts/partials/head/open_graph.html +++ b/themes/mastodon/layouts/partials/head/open_graph.html @@ -5,24 +5,24 @@ -{{ if .IsHome }} +{{- if .IsHome }} -{{ else }} - {{ if isset .Params "hero" }} +{{- else }} + {{- if isset .Params "hero" }} - {{ else }} - {{ $hero := .Page.Resources.GetMatch "hero" }} - - {{ if $hero }} - {{ $hero := $hero.Resize "1200x" }} - + {{- else }} + {{- $hero := .Page.Resources.GetMatch "hero" }} + {{- if $hero }} + {{- $hero := $hero.Resize "1200x" }} - {{ end }} - {{ end }} + {{- end }} + {{- end }} - {{ range default (slice .Params.author) .Params.authors }} - {{ $author := index $.Site.Data.authors . }} - {{ with $author.name }}{{ end }} - {{ with $author.webfinger }}{{ end }} - {{ end }} -{{ end }} + {{- if or (isset .Params "author") (isset .Params "authors") }} + {{- range default (slice .Params.author) .Params.authors }} + {{- $author := index $.Site.Data.authors . }} + {{ with $author.name }}{{ end }} + {{ with $author.webfinger }}{{ end }} + {{- end }} + {{- end }} +{{- end }}