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,22 +3,12 @@
|
||||||
{{ $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",
|
||||||
|
@ -27,15 +17,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
{{ 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 }}
|
||||||
|
@ -43,7 +24,7 @@
|
||||||
"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 }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -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