forked from laurens/fediversity_website
		
	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
					
				
					 6 changed files with 89 additions and 55 deletions
				
			
		|  | @ -5,13 +5,15 @@ | |||
|     <!-- Accessibility: skip-link voor mobiele apparaten --> | ||||
|     <a class="skip-link" href="#main">Ga naar hoofd</a> | ||||
|       <main id="main"> | ||||
|         {{ partialCached "header.html" . }} | ||||
|         {{ partial "breadcrumb.html" . }} | ||||
|         <div class="content"> | ||||
|           {{ partialCached "header.html" . }} | ||||
|           {{ partial "breadcrumb.html" . }} | ||||
|             <h1 class="post">{{ .Title }}</h1> | ||||
|             <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,42 +1,56 @@ | |||
| {{ 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 }}", | ||||
| "name": "{{ $author.name | default .Site.Params.textEmptyValue }}", | ||||
| {{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }} | ||||
| "affiliation": [ | ||||
|  { | ||||
|   "@type": "Organization", | ||||
|   "name": "{{ $.Site.Params.organization_name | default .Site.Params.textEmptyValue }}", | ||||
|   "sameAs": {{ .Site.Params.organization_sameas }} | ||||
|  "@context": "https://www.schema.org", | ||||
|  "@type": "Person", | ||||
|  "@id": "{{ .Permalink }}#person", | ||||
|  "url": "{{ .Permalink }}", | ||||
|  "name": "{{ $author.name | default .Site.Params.textEmptyValue }}", | ||||
|  {{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }} | ||||
|  "affiliation": [ | ||||
|   { | ||||
|    "@type": "Organization", | ||||
|    "name": "{{ $.Site.Params.organization_name | default .Site.Params.textEmptyValue }}", | ||||
|    "sameAs": {{ .Site.Params.organization_sameas }} | ||||
|   } | ||||
|  ], | ||||
|  {{ 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 }} | ||||
|  {{ if $author.worksfor }} | ||||
|  "worksFor": [ | ||||
|   { | ||||
|    "@type": "Organization", | ||||
|    "name": "{{ .Site.Params.name | default .Site.Params.textEmptyValue }}" | ||||
|   } | ||||
|  ], | ||||
|  {{ end }} | ||||
|  {{ if $author.sameas }}"sameAs": "{{ $author.sameas }}",{{ end }} | ||||
|  {{ if $author.address }} | ||||
|  "address": { | ||||
|   "@type": "PostalAddress", | ||||
|   "addressLocality": "{{ $author.address.city }}", | ||||
|   "addressRegion": "{{ $author.address.region }}", | ||||
|   "addressCountry": "{{ $author.address.country }}" | ||||
|  },{{ end }} | ||||
|  "image": "{{ $author.thumbnail | absURL }}", | ||||
|  "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 }}" | ||||
|   } | ||||
|  } | ||||
| ], | ||||
| {{ 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 }} | ||||
| {{ if $author.worksfor }} | ||||
| "worksFor": [ | ||||
|  { | ||||
|   "@type": "Organization", | ||||
|   "name": "{{ .Site.Params.name | default .Site.Params.textEmptyValue }}" | ||||
|  } | ||||
| ], | ||||
| {{ end }} | ||||
| {{ if $author.sameas }}"sameAs": "{{ $author.sameas }}",{{ end }} | ||||
| {{ if $author.address }} | ||||
| "address": { | ||||
|  "@type": "PostalAddress", | ||||
|  "addressLocality": "{{ $author.address.city }}", | ||||
|  "addressRegion": "{{ $author.address.region }}", | ||||
|  "addressCountry": "{{ $author.address.country }}" | ||||
| },{{ end }} | ||||
| "image": "{{ $author.thumbnail | absURL }}", | ||||
| "url": "{{ .Permalink }}" | ||||
| } | ||||
| </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