mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
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:
parent
5608f0a5e1
commit
2bfdb47ce7
@ -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 -}}
|
||||
|
Loading…
Reference in New Issue
Block a user