refactor: image handling logic + support for external images (#1235)

* refactor: simplify image partial logic, remove generation of different image sizes

* Remove `defaultImage.opengraph` configuration from `params.toml`.
This commit is contained in:
Jimmy
2026-01-25 23:29:41 +01:00
committed by GitHub
parent b1ddad1d22
commit 067bcdb370
11 changed files with 84 additions and 172 deletions
+2 -2
View File
@@ -6,8 +6,8 @@
{{- range $filtered -}}
{{- $data := dict "title" .Title "date" .Date "permalink" .RelPermalink "content" (.Plain) -}}
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}}
{{- if $image.exists -}}
{{- $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" -}}