backgrounds and feature images support svg

This commit is contained in:
Nuno Coração
2024-03-09 23:44:14 +00:00
parent b490f97b8b
commit 8bbd8b8626
11 changed files with 91 additions and 15 deletions

View File

@@ -47,7 +47,7 @@
{{- if not $featured }}{{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}}
{{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }}
{{- with $featured -}}
{{ if $disableImageOptimization }}
{{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg")}}
{{ with . }}
<div class="{{ $articleImageClasses }}" style="background-image:url({{ .RelPermalink }});"></div>
{{ end }}