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
@@ -38,8 +38,8 @@
{{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
{{- if $image.exists -}}
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
{{- if $image -}}
{{ "<" | html }}img src="{{ $image.permalink | absURL }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}}
{{- end -}}{{ $content }}</description>
</item>