From 23607527e4bde0a289094ddc863f64381d9b01d7 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 27 Mar 2024 10:58:22 +0100 Subject: [PATCH] fix: use page resource permalink in link image (#990) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/982 --- layouts/partials/article/components/links.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/partials/article/components/links.html b/layouts/partials/article/components/links.html index 118dbb3..a2ac26c 100644 --- a/layouts/partials/article/components/links.html +++ b/layouts/partials/article/components/links.html @@ -16,8 +16,12 @@ {{ with $link.image }} + {{ $permalink := . }} + {{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }} + {{ $permalink = .RelPermalink }} + {{ end }}
- +
{{ end }}