summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/layouts/partials/breadcrumb-jsonld.html
blob: 3f873a0f9bc2b333fbb02fd4bf2a233ef89d754e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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>