1

Gestion du JSON-LD

This commit is contained in:
2026-03-16 21:21:27 +01:00
parent 7676fe3e22
commit b518d573bc
14 changed files with 275 additions and 8 deletions

View 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 -}}