From e9a17fa52d41a46ab6f7f589888660987f0953df Mon Sep 17 00:00:00 2001 From: Chris Banes Date: Sat, 15 Oct 2022 14:12:31 +0100 Subject: [PATCH] Resize images displayed in article-link.html Currently the images are displayed at their full resolution. Those images could be very large, but end up being displayed as 300px wide. This changes that by resizing those images to a more suitable size. --- layouts/partials/article-link.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/article-link.html b/layouts/partials/article-link.html index e6cf63ba..36010d06 100644 --- a/layouts/partials/article-link.html +++ b/layouts/partials/article-link.html @@ -30,9 +30,9 @@ {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} - -
- + {{ with .Resize "600x" }} +
+ {{ end }} {{- else -}} {{- with $.Site.Params.images }} {{ end -}} @@ -76,4 +76,4 @@ {{ end }} - \ No newline at end of file +