fix jsonld

pull/2/head
Septs 2022-12-01 15:08:51 +08:00
parent 08049607d1
commit 683aa04858
No known key found for this signature in database
GPG Key ID: 65144037AFA516E1
1 changed files with 5 additions and 1 deletions

View File

@ -89,5 +89,9 @@ $breadcrumbs := dict
"itemListElement" (partial "breadcrumb-items" .)
-}}
<script type="application/ld+json">
{{ slice $brand $article $breadcrumbs | jsonify (dict "indent" " ") | safeJS }}
{{- $metaElements := slice $brand $article }}
{{- if index $breadcrumbs.itemListElement }}
{{- $metaElements = append $metaElements (slice $breadcrumbs) -}}
{{- end }}
{{ $metaElements | jsonify (dict "indent" " ") | safeJS }}
</script>