From 2bfdb47ce7b67a42c1989bd5a3101d99c4d0463a Mon Sep 17 00:00:00 2001 From: Farrel Franqois Date: Sat, 11 Jun 2022 14:29:55 +0700 Subject: [PATCH] fix: Incorrect if statement in `imageProcessing.cover.enabled` The incorrect `.context.Site.Params.imageProcessing.cover.enabled` if statement will make Hugo still process the image, even if the `.Site.Params.imageProcessing.cover.enabled` has been set to `false`. So, the equal condition is needed to ensure that option is truly enabled. --- layouts/partials/article-list/tile.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/article-list/tile.html b/layouts/partials/article-list/tile.html index be5744b..dd5c3aa 100644 --- a/layouts/partials/article-list/tile.html +++ b/layouts/partials/article-list/tile.html @@ -10,7 +10,7 @@ {{- $Width := $imageRaw.Width -}} {{- $Height := $imageRaw.Height -}} - {{- if .context.Site.Params.imageProcessing.cover.enabled -}} + {{- if eq .context.Site.Params.imageProcessing.cover.enabled true -}} {{- $thumbnail := $imageRaw.Fill .size -}} {{- $Permalink = $thumbnail.RelPermalink -}} {{- $Width = $thumbnail.Width -}}