Add post: 暗黑能天使
This commit is contained in:
29
layouts/partials/components/schema-node.html
Normal file
29
layouts/partials/components/schema-node.html
Normal file
@@ -0,0 +1,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 "utils/get-image" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }}
|
||||
{{- with $img }}
|
||||
"image": {{ . }},
|
||||
{{- end }}
|
||||
"url": {{ .Permalink }}
|
||||
}
|
||||
{{- end }}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user