29 lines
961 B
HTML
29 lines
961 B
HTML
{{- $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 "utils/get-image" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }}
|
|
{{- with $img }}
|
|
"image": {{ . }},
|
|
{{- end }}
|
|
"url": {{ .Permalink }}
|
|
}
|
|
{{- end }}
|
|
]
|
|
}
|
|
</script>
|
|
{{- end }} |