allow relative paths for opengraph images

This commit is contained in:
Christian Kündig 2024-01-10 22:21:40 +01:00
parent 71ce72b1bf
commit 7f01a06d4b

View File

@ -11,7 +11,7 @@
{{- else }}
{{- with $.Params.images -}}
{{- range first 6 . }}<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
{{- range first 6 . }}<meta property="og:image" content="{{ index (findRE "^/.*" . 1) 0 | default (print $.RelPermalink .) | absURL }}"/>{{ end -}}
{{- else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}