fix: process static image url correctly

This commit is contained in:
Xin
2023-09-24 11:03:34 +01:00
parent b283227046
commit 79883dc7cc
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,9 @@
{{- $image = $processed.RelPermalink -}}
{{- else -}}
{{/* Otherwise, use relative link of the image */}}
{{- $image = ($image | relURL) -}}
{{- if hasPrefix $image "/" -}}
{{- $image = relURL (strings.TrimPrefix "/" $image) -}}
{{- end -}}
{{- end -}}
{{- end -}}