diff options
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html b/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html new file mode 100644 index 0000000..3f873a0 --- /dev/null +++ b/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html @@ -0,0 +1,33 @@ +{{- $homeURL := absURL "/" -}} +{{- $articlesURL := absURL "/articles/" -}} +{{- $homeName := i18n "home" -}} +{{- $articlesName := i18n "articles" -}} +{{- if eq .Lang "it" -}} + {{- $homeURL = absURL "/it/" -}} + {{- $articlesURL = absURL "/it/articles/" -}} +{{- end -}} +<script type="application/ld+json"> +{ + "@context": "https://schema.org", + "@type": "BreadcrumbList", + "itemListElement": [ + { + "@type": "ListItem", + "position": 1, + "name": "{{ $homeName }}", + "item": "{{ $homeURL }}" + }, + { + "@type": "ListItem", + "position": 2, + "name": "{{ $articlesName }}", + "item": "{{ $articlesURL }}" + }, + { + "@type": "ListItem", + "position": 3, + "name": "{{ .Title }}" + } + ] +} +</script> |
