neff-steindesign.de/themes/neff/layouts/partials/schema/post.jsonld

35 lines
1.9 KiB
Plaintext
Executable File

{{- $context := .ctx }}
{{- $post := .post }}
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {{ partial "schema/site.jsonld" (dict "site" .ctx "ctx" .ctx "short" true) }},
"articleSection": "{{ .post.Section }}",
"name": "{{ .post.Title }}",
"headline": "{{ .post.Title }}",
"description": "{{ with .post.Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}",
"inLanguage": "{{ .post.Lang }}",
"author": {{- range (first 1 (where .ctx.Site.Data.kontakt.kontakt ".address.addressLocality" "Niederkassel")) -}}
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
{{- end -}},
"creator": {{- range (first 1 (where .ctx.Site.Data.kontakt.kontakt ".address.addressLocality" "Niederkassel")) -}}
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
{{- end -}},
"publisher": {{- range (first 1 (where .ctx.Site.Data.kontakt.kontakt ".address.addressLocality" "Niederkassel")) -}}
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
{{- end -}},
"copyrightHolder":
{{- range (first 1 (where .ctx.Site.Data.kontakt.kontakt ".address.addressLocality" "Niederkassel")) -}}
{{ partial "schema/organization.jsonld" (dict "org" . "ctx" $context "short" true) }}
{{- end -}},
"copyrightYear": "{{ .post.Date.Format "2006" }}",
"datePublished": "{{ .post.PublishDate | safeHTML }}",
"dateModified": "{{ .post.Lastmod | safeHTML }}",
"url": "{{ .post.Permalink }}",
"wordCount": "{{ .post.WordCount }}",
"keywords": "{{ with .post.Keywords }}{{ delimit . ", " }}{{ end }}",
{{ $imageURL := path.Join .post.RelPermalink "bilder/" .post.Params.featuredImage }}
"image": {{ partial "schema/image.jsonld" (dict "url" $imageURL "ctx" .ctx) }},
"articleBody": {{ .ctx.Content | jsonify }}
}