Verdere opmaak van gestructureerde data, aanbrengen onderscheid tussen webpagina's en profielpagina's, markeren content die uitgesproken kan worden
This commit is contained in:
parent
3d2a7b3b65
commit
029409826a
|
@ -5,13 +5,15 @@
|
|||
<!-- Accessibility: skip-link voor mobiele apparaten -->
|
||||
<a class="skip-link" href="#main">Ga naar hoofd</a>
|
||||
<main id="main">
|
||||
<div class="content">
|
||||
{{ partialCached "header.html" . }}
|
||||
{{ partial "breadcrumb.html" . }}
|
||||
<h1 class="post">{{ .Title }}</h1>
|
||||
<div class="content">
|
||||
<h1 class="post speakable">{{ .Title }}</h1>
|
||||
<div class="speakable">
|
||||
{{- block "main" . }}
|
||||
{{ .Content }}
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{ partial "show-call-to-action.html" . }}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<li>BundleType = {{ .BundleType }}</li>
|
||||
<li>IsPage = {{ .IsPage }}</li>
|
||||
<li>IsSection = {{ .IsSection }}</li>
|
||||
<li>Content types = {{ .Params.content_types }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
|
||||
{{ partial "schemas/schema_Organization.html" . }}
|
||||
{{ partial "schemas/schema_WebSite.html" . }}
|
||||
{{ partial "schemas/schema_WebPage.html" . }}
|
||||
|
||||
{{- else if .IsPage -}}
|
||||
|
||||
{{ partial "schemas/schema_BreadcrumbList.html" . }}
|
||||
|
||||
{{ if in .Params.content_types "person" }}
|
||||
{{ partial "schemas/schema_Person.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "schemas/schema_WebPage.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ partial "schemas/schema_BreadcrumbList.html" . }}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{{ if .Params.slug }}
|
||||
{{ $author := index .Site.Data.personen .Params.slug }}
|
||||
{{ $author := index .Site.Data.personen (substr $.File.LogicalName 0 -3) }}
|
||||
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://www.schema.org",
|
||||
"@type": "Person",
|
||||
"@id": "{{ .Permalink }}",
|
||||
"@id": "{{ .Permalink }}#person",
|
||||
"url": "{{ .Permalink }}",
|
||||
"name": "{{ $author.name | default .Site.Params.textEmptyValue }}",
|
||||
{{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }}
|
||||
"affiliation": [
|
||||
|
@ -36,7 +36,21 @@
|
|||
"addressCountry": "{{ $author.address.country }}"
|
||||
},{{ end }}
|
||||
"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>
|
||||
{{ end }}
|
||||
|
|
25
themes/nluug/layouts/partials/schemas/schema_WebPage.html
Normal file
25
themes/nluug/layouts/partials/schemas/schema_WebPage.html
Normal 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>
|
|
@ -4,27 +4,16 @@
|
|||
|
||||
<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",
|
||||
"@type": "WebSite",
|
||||
"@id": "{{ .Site.BaseURL }}",
|
||||
"additionalType": ["CreativeWork", "Person"],
|
||||
"@id": "{{ .Site.BaseURL }}#website",
|
||||
"additionalType": ["CreativeWork"],
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
|
||||
"alternateName": "{{ .Site.Title | 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 }}",
|
||||
"author": "{{ .Site.Params.author | default .Site.Params.textNoValue }}",
|
||||
"description": "{{ .Site.Params.description }}",
|
||||
|
|
Reference in a new issue