diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 0ed5584..5577736 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -17,7 +17,7 @@ {{- $Height = $image.Height -}} {{- $galleryImage = true -}} - {{- if (default true .Page.Site.Params.imageProcessing.content.enabled) -}} + {{- if .Page.Site.Params.imageProcessing.content.enabled -}} {{- $small := $image.Resize `480x` -}} {{- $big := $image.Resize `1024x` -}} {{- $Srcset = printf `%s 480w, %s 1024w` $small.RelPermalink $big.RelPermalink -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9bc618d..4e1e0b5 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -25,7 +25,7 @@ {{- $Width := $image.resource.Width -}} {{- $Height := $image.resource.Height -}} - {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} + {{- if .Page.Site.Params.imageProcessing.cover.enabled -}} {{- $thumbnail := $image.resource.Fill "120x120" -}} {{- $Permalink = $thumbnail.RelPermalink -}} {{- $Width = $thumbnail.Width -}} diff --git a/layouts/page/search.json b/layouts/page/search.json index 67f4cc6..a0f5184 100644 --- a/layouts/page/search.json +++ b/layouts/page/search.json @@ -7,7 +7,7 @@ {{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}} {{- if $image.exists -}} {{- $imagePermalink := "" -}} - {{- if and $image.resource (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} + {{- if and $image.resource .Page.Site.Params.imageProcessing.cover.enabled -}} {{- $thumbnail := $image.resource.Fill "120x120" -}} {{- $imagePermalink = (absURL $thumbnail.Permalink) -}} {{- else -}} diff --git a/layouts/partials/article-list/compact.html b/layouts/partials/article-list/compact.html index 376512a..edd58a0 100644 --- a/layouts/partials/article-list/compact.html +++ b/layouts/partials/article-list/compact.html @@ -19,7 +19,7 @@ {{- $Width := $image.resource.Width -}} {{- $Height := $image.resource.Height -}} - {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} + {{- if .Page.Site.Params.imageProcessing.cover.enabled -}} {{- $thumbnail := $image.resource.Fill "120x120" -}} {{- $Permalink = $thumbnail.RelPermalink -}} {{- $Width = $thumbnail.Width -}} diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html index 7582ec2..78b41bd 100644 --- a/layouts/partials/article/components/header.html +++ b/layouts/partials/article/components/header.html @@ -9,7 +9,7 @@ {{- $Height := $image.resource.Height -}} {{- $Srcset := "" -}} - {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} + {{- if .Page.Site.Params.imageProcessing.cover.enabled -}} {{- $thumbnail := $image.resource.Resize "800x" -}} {{- $thumbnailRetina := $image.resource.Resize "1600x" -}} {{- $Srcset = printf "%s 800w, %s 1600w" $thumbnail.RelPermalink $thumbnailRetina.RelPermalink -}} diff --git a/layouts/partials/head/colorScheme.html b/layouts/partials/head/colorScheme.html index 42f4dd8..04d63a5 100644 --- a/layouts/partials/head/colorScheme.html +++ b/layouts/partials/head/colorScheme.html @@ -1,5 +1,5 @@ -{{- $defaultColorScheme := default "auto" .Site.Params.colorScheme.default -}} -{{- if not (default false .Site.Params.colorScheme.toggle) -}} +{{- $defaultColorScheme := .Site.Params.colorScheme.default -}} +{{- if not .Site.Params.colorScheme.toggle -}} {{/* If toggle is disabled, force default scheme */}}