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