forked from laurens/fediversity_website
		
	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 | ||||
| # | ||||
| # Voor Schema.org | ||||
| organization_name = "NLUUG" | ||||
| 
 | ||||
| description = "NLUUG website met de doelstellingen, laatste nieuws en evenementen van onze vereniging." | ||||
| # Fallback-auteur voor posts die geen echte auteur hebben | ||||
|  |  | |||
|  | @ -5,7 +5,7 @@ | |||
| 
 | ||||
| {{- else if .IsPage -}} | ||||
| 
 | ||||
|   {{ if or (in .Params.content_types "Person") }} | ||||
|   {{ if in .Params.content_types "person" }} | ||||
|     {{ partial "schemas/schema_Person.html" . }} | ||||
|   {{ end }} | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| {{ if isset .Params "author" }} | ||||
| {{ $author := index .Site.Data.team .Params.author }} | ||||
| {{ if .Params.slug }} | ||||
| {{ $author := index .Site.Data.personen .Params.slug }} | ||||
| {{ $location := index .Site.Data.location .Site.Params.primarylocation }} | ||||
| <script type="application/ld+json"> | ||||
| { | ||||
|  | @ -7,20 +7,18 @@ | |||
| "@type": "Person", | ||||
| "@id": "{{ .Permalink }}", | ||||
| "name": "{{ $author.name | default .Site.Params.textEmptyValue }}", | ||||
| "alternateName": "{{ $author.name }}", | ||||
| {{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }} | ||||
| "affiliation": [ | ||||
|  { | ||||
|   "@type": "Organization", | ||||
|   "name": "{{ .Site.Params.name }}", | ||||
|   "sameAs": [ {{ partial "schemas/schema_Social.html" .Site.Params }} | ||||
|   ] | ||||
|   "name": "{{ $.Site.Params.organization_name | default .Site.Params.textEmptyValue }}" | ||||
|  } | ||||
| ], | ||||
| {{ if $author.gender }}"gender": "{{ $author.gender }}",{{ 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.worksfor }} | ||||
| "worksFor": [ | ||||
|  { | ||||
|   "@type": "Organization", | ||||
|  | @ -29,8 +27,8 @@ | |||
|   ] | ||||
|  } | ||||
| ], | ||||
| "url": "{{ .Site.BaseURL }}", | ||||
| "image": "{{ $author.thumbnail | absURL }}", | ||||
| {{ end }} | ||||
| {{ if $author.sameas }}"sameAs": "{{ $author.sameas }}",{{ end }} | ||||
| {{ if $author.address }} | ||||
| "address": { | ||||
|  "@type": "PostalAddress", | ||||
|  | @ -38,8 +36,8 @@ | |||
|  "addressRegion": "{{ $author.address.region }}", | ||||
|  "addressCountry": "{{ $author.address.country }}" | ||||
| },{{ end }} | ||||
| "sameAs": [ {{ partial "schemas/schema_Social.html" $author }} | ||||
|  ] | ||||
| "image": "{{ $author.thumbnail | absURL }}", | ||||
| "url": "{{ .Permalink }}" | ||||
| } | ||||
| </script> | ||||
| {{ end }} | ||||
|  |  | |||
|  | @ -1,22 +1,7 @@ | |||
| {{ if .social }} | ||||
| {{ if .social.twitter }}"https://twitter.com/{{ .social.twitter }}",{{ end }} | ||||
| {{ if .social.pinterest }}"https://pinterest.com/{{ .social.pinterest }}",{{ end }} | ||||
| {{ if .social.instagram }}"https://instagram.com/{{ .social.instagram }}",{{ end }} | ||||
| {{ if .social.facebook }}"https://www.facebook.com/{{ .social.facebook }}",{{ end }} | ||||
| {{ if .social.linkedin }}"https://ca.linkedin.com/in/{{ .social.linkedin }}/en",{{ end }} | ||||
| {{ if .social.googleplus }}"https://plus.google.com/+{{ .social.googleplus }}",{{ 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 }} | ||||
| {{- if .social -}} | ||||
| {{- if .social.twitter -}}"https://twitter.com/{{ .social.twitter }}",{{- end -}} | ||||
| {{- if .social.facebook -}}"https://www.facebook.com/{{ .social.facebook }}",{{- end -}} | ||||
| {{- if .social.linkedin -}}"{{ .social.linkedin }}",{{- end -}} | ||||
| {{- if .social.github -}}"https://github.com/{{ .social.github }}",{{- end -}} | ||||
| {{- if .social.website -}}"{{ .social.website }}"{{ else }}"{{ .Site.Params.social.website }}"{{- end -}} | ||||
| {{- end -}} | ||||
|  |  | |||
		Reference in a new issue