mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
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
1 changed files with 5 additions and 1 deletions
|
@ -16,8 +16,12 @@
|
|||
</div>
|
||||
|
||||
{{ with $link.image }}
|
||||
{{ $permalink := . }}
|
||||
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
|
||||
{{ $permalink = .RelPermalink }}
|
||||
{{ end }}
|
||||
<div class="article-image">
|
||||
<img src="{{ . }}" loading="lazy">
|
||||
<img src="{{ $permalink }}" loading="lazy">
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue