Wijzigingen voor inbouwen ondersteuning Schema.org-structuren
This commit is contained in:
parent
9186ffe090
commit
30ac449de6
|
@ -15,11 +15,5 @@
|
||||||
{{ partialCached "style.html" . }}
|
{{ partialCached "style.html" . }}
|
||||||
|
|
||||||
<!-- Schema.org opmaak -->
|
<!-- Schema.org opmaak -->
|
||||||
{{ if .IsHome -}}
|
{{ partial "schemas/include-relevant-schemas.html" . }}
|
||||||
{{ partial "schemas/schema_WebSite.html" . }}
|
|
||||||
{{- else if .IsPage -}}
|
|
||||||
{{ if or (in .Params.content_types "Person") }}
|
|
||||||
{{ partial "schemas/schema_Person.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{ if .IsHome -}}
|
||||||
|
|
||||||
|
{{ partial "schemas/schema_Organization.html" . }}
|
||||||
|
{{ partial "schemas/schema_WebSite.html" . }}
|
||||||
|
|
||||||
|
{{- else if .IsPage -}}
|
||||||
|
|
||||||
|
{{ if or (in .Params.content_types "Person") }}
|
||||||
|
{{ partial "schemas/schema_Person.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,8 @@
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "https://schema.org/",
|
||||||
|
"@type": "Organization",
|
||||||
|
"url": "{{ .Site.BaseURL }}",
|
||||||
|
"logo": "{{ .Site.Params.logoHiRes | absURL | default .Site.Params.textEmptyValue }}"
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -3,62 +3,43 @@
|
||||||
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
|
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
"@context": "http://www.schema.org",
|
"@context": "https://www.schema.org",
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"@id": "{{ .Permalink }}",
|
"@id": "{{ .Permalink }}",
|
||||||
"name": "{{ $author.name }}",
|
"name": "{{ $author.name | default .Site.Params.textEmptyValue }}",
|
||||||
"alternateName": "{{ $author.name }}",
|
"alternateName": "{{ $author.name }}",
|
||||||
{{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }}
|
{{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }}
|
||||||
{{ if $author.address }}
|
|
||||||
"birthPlace" : {
|
|
||||||
"@type": "Place",
|
|
||||||
"address": {
|
|
||||||
"@type": "PostalAddress",
|
|
||||||
"addressLocality": "{{ $author.address.city }}",
|
|
||||||
"addressRegion": "{{ $author.address.region }}",
|
|
||||||
"addressCountry": "{{ $author.address.country }}"
|
|
||||||
}
|
|
||||||
},{{ end }}
|
|
||||||
"affiliation": [
|
"affiliation": [
|
||||||
{
|
{
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "{{ .Site.Params.name }}",
|
"name": "{{ .Site.Params.name }}",
|
||||||
"sameAs": [ {{ partial "schemas/schema_Social.html" .Site.Params }}
|
"sameAs": [ {{ partial "schemas/schema_Social.html" .Site.Params }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
{{ if $author.education }}
|
|
||||||
"alumniOf": [
|
|
||||||
{
|
|
||||||
"@type": "CollegeOrUniversity",
|
|
||||||
"name": "{{ $author.education.university }}",
|
|
||||||
"sameAs": "{{ $author.education.url }}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
{{ end }}
|
|
||||||
{{ if $author.gender }}"gender": "{{ $author.gender }}",{{ end }}
|
{{ if $author.gender }}"gender": "{{ $author.gender }}",{{ end }}
|
||||||
{{ if $author.jobfunction }}"Description": "{{ $author.jobfunction }}",{{ end }}
|
{{ if $author.jobfunction }}"Description": "{{ $author.jobfunction }}",{{ end }}
|
||||||
{{ if $author.description }}"disambiguatingDescription": "{{ $author.description }},{{ end }}
|
{{ if $author.description }}"disambiguatingDescription": "{{ $author.description }},{{ end }}
|
||||||
{{ if $author.jobtitle }}"jobTitle": "{{ $author.jobtitle }}",{{ end }}
|
{{ if $author.jobtitle }}"jobTitle": "{{ $author.jobtitle }}",{{ end }}
|
||||||
"worksFor": [
|
"worksFor": [
|
||||||
{
|
{
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "{{ .Site.Params.name }}",
|
"name": "{{ .Site.Params.name | default .Site.Params.textEmptyValue }}",
|
||||||
"sameAs": [ {{ partial "schemas/schema_Social.html" .Site.Params }}
|
"sameAs": [ {{ partial "schemas/schema_Social.html" .Site.Params }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": "{{ .Site.BaseURL }}",
|
"url": "{{ .Site.BaseURL }}",
|
||||||
"image": "{{ $author.thumbnail | absURL }}",
|
"image": "{{ $author.thumbnail | absURL }}",
|
||||||
{{ if $author.address }}
|
{{ if $author.address }}
|
||||||
"address": {
|
"address": {
|
||||||
"@type": "PostalAddress",
|
"@type": "PostalAddress",
|
||||||
"addressLocality": "{{ $author.address.city }}",
|
"addressLocality": "{{ $author.address.city }}",
|
||||||
"addressRegion": "{{ $author.address.region }}",
|
"addressRegion": "{{ $author.address.region }}",
|
||||||
"addressCountry": "{{ $author.address.country }}"
|
"addressCountry": "{{ $author.address.country }}"
|
||||||
},{{ end }}
|
},{{ end }}
|
||||||
"sameAs": [ {{ partial "schemas/schema_Social.html" $author }}
|
"sameAs": [ {{ partial "schemas/schema_Social.html" $author }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
{
|
{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "Webpage",
|
"@type": "Webpage",
|
||||||
"specialty": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}",
|
"specialty": "{{ .Site.Params.description | default .Site.Params.textEmptyValue }}",
|
||||||
"mainContentOfPage": {
|
"mainContentOfPage": {
|
||||||
"@context": "https://schema.org/",
|
"@context": "https://schema.org/",
|
||||||
"@type": "WebPageElement",
|
"@type": "WebPageElement",
|
||||||
"cssSelector": ".body-contentTODO"
|
"cssSelector": ".body-contentTODO"
|
||||||
},
|
},
|
||||||
"primaryImageOfPage": "{{ .Site.Params.imageurl | absURL }}"
|
"primaryImageOfPage": "{{ .Site.Params.imageurl | absURL | default .Site.Params.textEmptyValue }}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
|
|
Reference in a new issue