this repo has no description
1{{ define "fragments/breadcrumb" }}
2 {{ $items := . }}
3 {{ if gt (len $items) 0 }}
4 <script type="application/ld+json">
5 {
6 "@context": "https://schema.org",
7 "@type": "BreadcrumbList",
8 "itemListElement": [
9 {{ range $idx, $item := $items }}
10 {{ if gt $idx 0 }},{{ end }}
11 {
12 "@type": "ListItem",
13 "position": {{ add $idx 1 }},
14 "name": "{{ index $item 0 }}",
15 "item": "{{ index $item 1 }}"
16 }
17 {{ end }}
18 ]
19 }
20 </script>
21 {{ end }}
22{{ end }}