From 8b28b06e725cba09deded07a6bd5e5c7d047fac2 Mon Sep 17 00:00:00 2001 From: panr Date: Sun, 6 Nov 2022 10:31:25 +0100 Subject: [PATCH] Fix cover param for og:image --- layouts/partials/head.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 70cfd00..7a3c664 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -52,8 +52,12 @@ -{{ if and (not .IsHome) (isset .Params "cover") }} - +{{ if (isset .Params "cover") }} + {{ $pageCover := .Param "cover" }} + {{ with (.Resources.GetMatch (.Param "cover")) }} + {{ $pageCover = .RelPermalink }} + {{ end }} + {{ else }} {{ if isset $.Site.Params "favicon" }} @@ -61,8 +65,8 @@ {{ end }} {{ end }} - - + + {{ range .Params.categories }} {{ end }}