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.
This commit is contained in:
Farrel Franqois 2022-06-11 14:29:55 +07:00 committed by GitHub
parent 5608f0a5e1
commit 2bfdb47ce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 -}}