diff --git a/layouts/_partials/article/components/links.html b/layouts/_partials/article/components/links.html index d64eb0b..134c159 100644 --- a/layouts/_partials/article/components/links.html +++ b/layouts/_partials/article/components/links.html @@ -14,14 +14,17 @@ {{ end }} - - {{ with $link.image }} - {{ $permalink := . }} - {{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }} - {{ $permalink = .RelPermalink }} - {{ end }} + + {{- $image := partial "helper/image" (dict "Image" $link.image "Resources" $.Resources) -}} + {{- with $image -}}