From 741ba5c10ebaeac955f17748c83c9ea6843f0013 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Mon, 10 Jul 2023 17:44:29 +0200 Subject: [PATCH] fix(images): use the right resource loader function and others things --- layouts/partials/header.html | 32 +++++++++++++------------ layouts/partials/helpers/image.html | 2 +- layouts/partials/opengraph/include.html | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 1d76d1a..ef87dce 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -7,21 +7,23 @@
diff --git a/layouts/partials/helpers/image.html b/layouts/partials/helpers/image.html index 0cbe277..373a113 100644 --- a/layouts/partials/helpers/image.html +++ b/layouts/partials/helpers/image.html @@ -13,7 +13,7 @@ {{ $result = merge $result (dict "permalink" $imageValue) }} {{ else }} - {{ $pageResourceImage := .Context.Resources.GetMatch (printf "%s" ($imageValue | safeURL)) }} + {{ $pageResourceImage := resources.GetMatch (printf "%s" ($imageValue | safeURL)) }} {{ if $pageResourceImage }} diff --git a/layouts/partials/opengraph/include.html b/layouts/partials/opengraph/include.html index 33b7f2f..ad5cd18 100644 --- a/layouts/partials/opengraph/include.html +++ b/layouts/partials/opengraph/include.html @@ -37,7 +37,7 @@ {{- end -}} {{- end -}} -{{ $image := partialCached "helpers/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }} +{{ $image := partial "helpers/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }} {{ if $image.exists }} {{- end -}}