fix: use page resource permalink in link image (#990)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/982
This commit is contained in:
parent
54a8ace564
commit
23607527e4
@ -16,8 +16,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ with $link.image }}
|
{{ with $link.image }}
|
||||||
|
{{ $permalink := . }}
|
||||||
|
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
|
||||||
|
{{ $permalink = .RelPermalink }}
|
||||||
|
{{ end }}
|
||||||
<div class="article-image">
|
<div class="article-image">
|
||||||
<img src="{{ . }}" loading="lazy">
|
<img src="{{ $permalink }}" loading="lazy">
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user