mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 12:03:31 +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 -}}
|
{{- $Width := $imageRaw.Width -}}
|
||||||
{{- $Height := $imageRaw.Height -}}
|
{{- $Height := $imageRaw.Height -}}
|
||||||
|
|
||||||
{{- if .context.Site.Params.imageProcessing.cover.enabled -}}
|
{{- if eq .context.Site.Params.imageProcessing.cover.enabled true -}}
|
||||||
{{- $thumbnail := $imageRaw.Fill .size -}}
|
{{- $thumbnail := $imageRaw.Fill .size -}}
|
||||||
{{- $Permalink = $thumbnail.RelPermalink -}}
|
{{- $Permalink = $thumbnail.RelPermalink -}}
|
||||||
{{- $Width = $thumbnail.Width -}}
|
{{- $Width = $thumbnail.Width -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user