refactor: also remove image resize logic in search.json

This commit is contained in:
Jimmy Cai
2026-01-25 23:44:47 +01:00
parent ae0de75992
commit d002c0d0d9
+1 -9
View File
@@ -8,15 +8,7 @@
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
{{- if $image -}}
{{- $imagePermalink := "" -}}
{{- if and $image.resource (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}
{{- $thumbnail := $image.resource.Fill "120x120" -}}
{{- $imagePermalink = (absURL $thumbnail.Permalink) -}}
{{- else -}}
{{- $imagePermalink = $image.permalink -}}
{{- end -}}
{{- $data = merge $data (dict "image" (absURL $imagePermalink)) -}}
{{- $data = merge $data (dict "image" $image.Permalink) -}}
{{- end -}}
{{- $result = $result | append $data -}}