Gestion du JSON-LD
This commit is contained in:
19
layouts/partials/seo/image.html
Normal file
19
layouts/partials/seo/image.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $socialImage := partial "head/social-image.html" . -}}
|
||||
{{- $openGraphImage := $socialImage.openGraph -}}
|
||||
{{- $image := dict -}}
|
||||
{{- with $openGraphImage.url -}}
|
||||
{{- $image = dict
|
||||
"@type" "ImageObject"
|
||||
"url" .
|
||||
-}}
|
||||
{{- with $openGraphImage.width -}}
|
||||
{{- $image = merge $image (dict "width" .) -}}
|
||||
{{- end -}}
|
||||
{{- with $openGraphImage.height -}}
|
||||
{{- $image = merge $image (dict "height" .) -}}
|
||||
{{- end -}}
|
||||
{{- with $openGraphImage.alt -}}
|
||||
{{- $image = merge $image (dict "caption" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- return $image -}}
|
||||
Reference in New Issue
Block a user