fix-featimage-ratio #127

Merged
paspo merged 4 commits from paspo/bglug.it:fix-featimage-ratio into main 2024-07-17 21:37:19 +00:00
Showing only changes of commit 38d662b594 - Show all commits

View File

@ -4,9 +4,9 @@
{{- $path := strings.TrimPrefix "./" $u.Path }}
{{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}}
{{- if gt .Width 1400 -}}
{{- $src = (.Resize "1400x jpg q50").RelPermalink -}}
{{- $src = (.Resize "1400x webp q50").RelPermalink -}}
{{- else -}}
{{- $src = .RelPermalink -}}
{{- $src = (.Process "webp q50").RelPermalink -}}
{{- end -}}
{{- with $u.RawQuery -}}
{{- $src = printf "%s?%s" $src . -}}