Skip to content

Commit 2360752

Browse files
authored
fix: use page resource permalink in link image (CaiJimmy#990)
closes CaiJimmy#982
1 parent 54a8ace commit 2360752

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

layouts/partials/article/components/links.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ <h2 class="article-title">
1616
</div>
1717

1818
{{ with $link.image }}
19+
{{ $permalink := . }}
20+
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
21+
{{ $permalink = .RelPermalink }}
22+
{{ end }}
1923
<div class="article-image">
20-
<img src="{{ . }}" loading="lazy">
24+
<img src="{{ $permalink }}" loading="lazy">
2125
</div>
2226
{{ end }}
2327
</a>

0 commit comments

Comments
 (0)