6
0
Fork 0

Verdere opmaak van gestructureerde data, aanbrengen onderscheid tussen webpagina's en profielpagina's, markeren content die uitgesproken kan worden

This commit is contained in:
Michael Boelen 2023-06-21 15:34:33 +02:00
parent 3d2a7b3b65
commit 029409826a
6 changed files with 89 additions and 55 deletions

View file

@ -5,13 +5,15 @@
<!-- Accessibility: skip-link voor mobiele apparaten --> <!-- Accessibility: skip-link voor mobiele apparaten -->
<a class="skip-link" href="#main">Ga naar hoofd</a> <a class="skip-link" href="#main">Ga naar hoofd</a>
<main id="main"> <main id="main">
<div class="content">
{{ partialCached "header.html" . }} {{ partialCached "header.html" . }}
{{ partial "breadcrumb.html" . }} {{ partial "breadcrumb.html" . }}
<h1 class="post">{{ .Title }}</h1> <div class="content">
<h1 class="post speakable">{{ .Title }}</h1>
<div class="speakable">
{{- block "main" . }} {{- block "main" . }}
{{ .Content }} {{ .Content }}
{{- end }} {{- end }}
</div>
{{ partial "show-call-to-action.html" . }} {{ partial "show-call-to-action.html" . }}

View file

@ -53,6 +53,7 @@
<li>BundleType = {{ .BundleType }}</li> <li>BundleType = {{ .BundleType }}</li>
<li>IsPage = {{ .IsPage }}</li> <li>IsPage = {{ .IsPage }}</li>
<li>IsSection = {{ .IsSection }}</li> <li>IsSection = {{ .IsSection }}</li>
<li>Content types = {{ .Params.content_types }}</li>
</ul> </ul>
</div> </div>
{{ end }} {{ end }}

View file

@ -2,13 +2,16 @@
{{ partial "schemas/schema_Organization.html" . }} {{ partial "schemas/schema_Organization.html" . }}
{{ partial "schemas/schema_WebSite.html" . }} {{ partial "schemas/schema_WebSite.html" . }}
{{ partial "schemas/schema_WebPage.html" . }}
{{- else if .IsPage -}} {{- else if .IsPage -}}
{{ partial "schemas/schema_BreadcrumbList.html" . }}
{{ if in .Params.content_types "person" }} {{ if in .Params.content_types "person" }}
{{ partial "schemas/schema_Person.html" . }} {{ partial "schemas/schema_Person.html" . }}
{{ else }}
{{ partial "schemas/schema_WebPage.html" . }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ partial "schemas/schema_BreadcrumbList.html" . }}

View file

@ -1,11 +1,11 @@
{{ if .Params.slug }} {{ $author := index .Site.Data.personen (substr $.File.LogicalName 0 -3) }}
{{ $author := index .Site.Data.personen .Params.slug }}
{{ $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": "https://www.schema.org", "@context": "https://www.schema.org",
"@type": "Person", "@type": "Person",
"@id": "{{ .Permalink }}", "@id": "{{ .Permalink }}#person",
"url": "{{ .Permalink }}",
"name": "{{ $author.name | default .Site.Params.textEmptyValue }}", "name": "{{ $author.name | default .Site.Params.textEmptyValue }}",
{{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }} {{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }}
"affiliation": [ "affiliation": [
@ -36,7 +36,21 @@
"addressCountry": "{{ $author.address.country }}" "addressCountry": "{{ $author.address.country }}"
},{{ end }} },{{ end }}
"image": "{{ $author.thumbnail | absURL }}", "image": "{{ $author.thumbnail | absURL }}",
"url": "{{ .Permalink }}" "mainEntityOfPage": {
"@type": "ProfilePage",
"@id": "{{ .Permalink }}#profilepage",
"url": "{{ .Permalink }}",
"name": "{{ .Title }}",
"speakable": {
"@type": "SpeakableSpecification",
"cssSelector": ".speakable"
},
"isPartOf": {
"@type": "WebSite",
"@id": "{{ .Site.BaseURL }}#website",
"url": "{{ .Site.BaseURL }}",
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}"
}
}
} }
</script> </script>
{{ end }}

View file

@ -0,0 +1,25 @@
<script type="application/ld+json">
{
"@context": "https://www.schema.org",
"@type": "WebPage",
"@id": "{{ .Permalink }}#webpage",
"name": "{{ .Title | default .Site.Params.textEmptyValue }}",
"datePublished": {{ .Date }},
"dateModified": {{ .Lastmod }},
"inLanguage": "{{ .Site.LanguageCode }}",
"mainContentOfPage": {
"@type": "WebPageElement",
"cssSelector": ".content"
},
"speakable": {
"@type": "SpeakableSpecification",
"cssSelector": ".speakable"
},
"isPartOf": {
"@type": "WebSite",
"@id": "{{ .Site.BaseURL }}#website",
"url": "{{ .Site.BaseURL }}",
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}"
}
}
</script>

View file

@ -4,27 +4,16 @@
<script type="application/ld+json"> <script type="application/ld+json">
[ [
{
"@context": "https://schema.org",
"@type": "Webpage",
"specialty": "{{ .Site.Params.description | default .Site.Params.textEmptyValue }}",
"mainContentOfPage": {
"@context": "https://schema.org/",
"@type": "WebPageElement",
"cssSelector": ".body-contentTODO"
},
"primaryImageOfPage": "{{ .Site.Params.imageurl | absURL | default .Site.Params.textEmptyValue }}"
},
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "WebSite", "@type": "WebSite",
"@id": "{{ .Site.BaseURL }}", "@id": "{{ .Site.BaseURL }}#website",
"additionalType": ["CreativeWork", "Person"], "additionalType": ["CreativeWork"],
"url": "{{ .Site.BaseURL }}", "url": "{{ .Site.BaseURL }}",
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}", "name": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
"alternateName": "{{ .Site.Title | default .Site.Params.textNoTitle }}", "alternateName": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
"headline": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}", "headline": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}",
"image": "{{ .Site.Params.imageurl | absURL | default .Site.Params.textNoTitle }}", {{ if .Site.Params.imageurl }}"image": "{{ .Site.Params.imageurl | absURL | default .Site.Params.textNoTitle }}",{{ end }}
"inLanguage": "{{ .Site.LanguageCode }}", "inLanguage": "{{ .Site.LanguageCode }}",
"author": "{{ .Site.Params.author | default .Site.Params.textNoValue }}", "author": "{{ .Site.Params.author | default .Site.Params.textNoValue }}",
"description": "{{ .Site.Params.description }}", "description": "{{ .Site.Params.description }}",