fix: regression with custom icon rendering (#3279)

During previous refactoring, the {{with}} was refactored to {{if}} leading to missing icon resource context, and hence custom icons were no longer rendering.

Fixes #3278
This commit is contained in:
Olaf Lipinski authored and GitHub committed 2025-10-21 21:24:13 +01:00
1 parent ad44e76171
commit cdee5c8997
1 file changed
+3 -3
@@ -43,9 +43,9 @@
)
}}
{{- end -}}
{{- $icon := resources.Get $icon_path -}}
{{ if $icon }}
{{ $icon = .Content }}
{{- $icon_resource := resources.Get $icon_path -}}
{{ if $icon_resource }}
{{ $icon = $icon_resource.Content }}
{{ else }}
{{ $icon = index (index site.Data.icons.brands "icons") "hugo" }}
{{ end }}