allow relative paths for opengraph images
This commit is contained in:
parent
71ce72b1bf
commit
7f01a06d4b
@ -11,7 +11,7 @@
|
|||||||
{{- else }}
|
{{- else }}
|
||||||
|
|
||||||
{{- with $.Params.images -}}
|
{{- 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 -}}
|
{{- else -}}
|
||||||
{{- $images := $.Resources.ByType "image" -}}
|
{{- $images := $.Resources.ByType "image" -}}
|
||||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user