Fix home page to allow for global assets in thumbnails as well

This commit is contained in:
Christian Wolf 2024-07-10 11:41:22 +02:00
parent 3c7977dbae
commit 43b55ef8dd

View File

@ -14,9 +14,14 @@
<div class="teaser-image">
{{ $page := . }}
{{ if .Params.Image }}
{{ with (.Resources.GetMatch (.Params.Image)).Fit "290x190 webp" }}
{{ $resImage := resources.GetMatch (.Params.Image) }}
{{ with .Resources.GetMatch (.Params.Image) }}
{{ $resImage = . }}
{{ end }}
{{/* {{ with ($resImage).Fit "290x190 webp" }} */}}
{{ with $resImage }}
<a href="{{ $urlBlogEntry }}">
<img src="{{ .RelPermalink }}">
<img src="{{ (.Fit "290x190 webp").RelPermalink }}">
</a>
{{ end }}
{{ end }}