Schema.org Person toevoegen
This commit is contained in:
		
							parent
							
								
									2985b3e30d
								
							
						
					
					
						commit
						72fba826d0
					
				
					 4 changed files with 20 additions and 34 deletions
				
			
		| 
						 | 
					@ -1,4 +1,7 @@
 | 
				
			||||||
# Aanvullende velden die we binnen de website gebruiken
 | 
					# Aanvullende velden die we binnen de website gebruiken
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Voor Schema.org
 | 
				
			||||||
 | 
					organization_name = "NLUUG"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
description = "NLUUG website met de doelstellingen, laatste nieuws en evenementen van onze vereniging."
 | 
					description = "NLUUG website met de doelstellingen, laatste nieuws en evenementen van onze vereniging."
 | 
				
			||||||
# Fallback-auteur voor posts die geen echte auteur hebben
 | 
					# Fallback-auteur voor posts die geen echte auteur hebben
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{- else if .IsPage -}}
 | 
					{{- else if .IsPage -}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  {{ if or (in .Params.content_types "Person") }}
 | 
					  {{ if in .Params.content_types "person" }}
 | 
				
			||||||
    {{ partial "schemas/schema_Person.html" . }}
 | 
					    {{ partial "schemas/schema_Person.html" . }}
 | 
				
			||||||
  {{ end }}
 | 
					  {{ end }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
{{ if isset .Params "author" }}
 | 
					{{ if .Params.slug }}
 | 
				
			||||||
{{ $author := index .Site.Data.team .Params.author }}
 | 
					{{ $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">
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -7,20 +7,18 @@
 | 
				
			||||||
"@type": "Person",
 | 
					"@type": "Person",
 | 
				
			||||||
"@id": "{{ .Permalink }}",
 | 
					"@id": "{{ .Permalink }}",
 | 
				
			||||||
"name": "{{ $author.name | default .Site.Params.textEmptyValue }}",
 | 
					"name": "{{ $author.name | default .Site.Params.textEmptyValue }}",
 | 
				
			||||||
"alternateName": "{{ $author.name }}",
 | 
					 | 
				
			||||||
{{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }}
 | 
					{{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }}
 | 
				
			||||||
"affiliation": [
 | 
					"affiliation": [
 | 
				
			||||||
 {
 | 
					 {
 | 
				
			||||||
  "@type": "Organization",
 | 
					  "@type": "Organization",
 | 
				
			||||||
  "name": "{{ .Site.Params.name }}",
 | 
					  "name": "{{ $.Site.Params.organization_name | default .Site.Params.textEmptyValue }}"
 | 
				
			||||||
  "sameAs": [ {{ partial "schemas/schema_Social.html" .Site.Params }}
 | 
					 | 
				
			||||||
  ]
 | 
					 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
],
 | 
					],
 | 
				
			||||||
{{ 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 }}
 | 
				
			||||||
{{ if $author.jobtitle }}"jobTitle": "{{ $author.jobtitle }}",{{ end }}
 | 
					{{ if $author.jobtitle }}"jobTitle": "{{ $author.jobtitle }}",{{ end }}
 | 
				
			||||||
 | 
					{{ if $author.worksfor }}
 | 
				
			||||||
"worksFor": [
 | 
					"worksFor": [
 | 
				
			||||||
 {
 | 
					 {
 | 
				
			||||||
  "@type": "Organization",
 | 
					  "@type": "Organization",
 | 
				
			||||||
| 
						 | 
					@ -29,8 +27,8 @@
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
],
 | 
					],
 | 
				
			||||||
"url": "{{ .Site.BaseURL }}",
 | 
					{{ end }}
 | 
				
			||||||
"image": "{{ $author.thumbnail | absURL }}",
 | 
					{{ if $author.sameas }}"sameAs": "{{ $author.sameas }}",{{ end }}
 | 
				
			||||||
{{ if $author.address }}
 | 
					{{ if $author.address }}
 | 
				
			||||||
"address": {
 | 
					"address": {
 | 
				
			||||||
 "@type": "PostalAddress",
 | 
					 "@type": "PostalAddress",
 | 
				
			||||||
| 
						 | 
					@ -38,8 +36,8 @@
 | 
				
			||||||
 "addressRegion": "{{ $author.address.region }}",
 | 
					 "addressRegion": "{{ $author.address.region }}",
 | 
				
			||||||
 "addressCountry": "{{ $author.address.country }}"
 | 
					 "addressCountry": "{{ $author.address.country }}"
 | 
				
			||||||
},{{ end }}
 | 
					},{{ end }}
 | 
				
			||||||
"sameAs": [ {{ partial "schemas/schema_Social.html" $author }}
 | 
					"image": "{{ $author.thumbnail | absURL }}",
 | 
				
			||||||
 ]
 | 
					"url": "{{ .Permalink }}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
{{ end }}
 | 
					{{ end }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +1,7 @@
 | 
				
			||||||
{{ if .social }}
 | 
					{{- if .social -}}
 | 
				
			||||||
{{ if .social.twitter }}"https://twitter.com/{{ .social.twitter }}",{{ end }}
 | 
					{{- if .social.twitter -}}"https://twitter.com/{{ .social.twitter }}",{{- end -}}
 | 
				
			||||||
{{ if .social.pinterest }}"https://pinterest.com/{{ .social.pinterest }}",{{ end }}
 | 
					{{- if .social.facebook -}}"https://www.facebook.com/{{ .social.facebook }}",{{- end -}}
 | 
				
			||||||
{{ if .social.instagram }}"https://instagram.com/{{ .social.instagram }}",{{ end }}
 | 
					{{- if .social.linkedin -}}"{{ .social.linkedin }}",{{- end -}}
 | 
				
			||||||
{{ if .social.facebook }}"https://www.facebook.com/{{ .social.facebook }}",{{ end }}
 | 
					{{- if .social.github -}}"https://github.com/{{ .social.github }}",{{- end -}}
 | 
				
			||||||
{{ if .social.linkedin }}"https://ca.linkedin.com/in/{{ .social.linkedin }}/en",{{ end }}
 | 
					{{- if .social.website -}}"{{ .social.website }}"{{ else }}"{{ .Site.Params.social.website }}"{{- end -}}
 | 
				
			||||||
{{ if .social.googleplus }}"https://plus.google.com/+{{ .social.googleplus }}",{{ end }}
 | 
					{{- end -}}
 | 
				
			||||||
{{ if .social.youtube }}"https://www.youtube.com/user/{{ .social.youtube }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.github }}"https://github.com/{{ .social.github }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.wordpress }}"https://profiles.wordpress.org/{{ .social.wordpress }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.angel }}"https://angel.co/{{ .social.angel }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.foursquare }}"https://www.foursquare.com/user/{{ .social.foursquare }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.yelp }}"https://{{ .social.yelp }}.yelp.ca",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.codepen }}"https://codepen.io/{{ .social.codepen }}/",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.stackoverflow }}"https://stackoverflow.com/users/{{ .social.stackoverflow }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.dribbble }}"https://dribbble.com/{{ .social.dribbble }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.deviantart }}"http://{{ .social.deviantart }}.deviantart.com/",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.behance }}"https://www.behance.net/{{ .social.behance }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.flickr }}"https://www.flickr.com/people/{{ .social.flickr }}/",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.medium }}"https://medium.com/@{{ .social.medium }}",{{ end }}
 | 
					 | 
				
			||||||
{{ if .social.website }}"{{ .social.website }}"{{ else }}"{{ .Site.Params.social.website }}"{{ end }}
 | 
					 | 
				
			||||||
{{ end }}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue