blob: ec4fda0c38c0f891883bc4ae4b1a65602a7a2409 (
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
|
{{- $paginator := .Paginate .Pages }}
{{- $pages := .Paginator.Pages }}
{{- if eq .Type "authors" }}
{{- $pages = .Pages }}
{{- end }}
{{- with $pages }}
<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type":"ItemList",
"itemListElement":[
{{- range $index, $value := . -}}
{{- if gt $index 0 -}},{{- end -}}
{
"@type":"ListItem",
"position": {{ add $index 1 }},
"name": {{ .Title }},
"description": {{ if .Description }}{{ .Description }}{{ else if .Summary }}{{ .Summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ end }},
{{- $img := partial "get_image.html" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }}
{{- with $img }}
"image": {{ . }},
{{- end }}
"url": {{ .Permalink }}
}
{{- end }}
]
}
</script>
{{- end }}
|