let hugo resize all images

This commit is contained in:
Christoph Cullmann 2025-07-20 00:05:55 +02:00
parent 19b8f23fc0
commit 16823e27a9
No known key found for this signature in database
22 changed files with 73 additions and 71 deletions

View file

@ -1,5 +1,7 @@
<center>
<a href="{{ .Get "src" }}" target="_new" style="border-bottom: 0px; background-color: inherit;">
<img width="90%" src="{{ .Get "src" }}" alt="{{ .Get "alt" }}" style="border: 0px;" />
{{ $original := .Page.Resources.GetMatch (.Get "src") }}
{{ $preview := $original.Resize "660x" }}
<a href="{{ $original.RelPermalink }}" target="_new" style="border-bottom: 0px; background-color: inherit;">
<img src="{{ $preview.RelPermalink }}" alt="{{ .Get "alt" }}" style="border: 0px;" />
</a>
</center>