forked from laurens/fediversity_website
Aanvullen sameAs met social media en indien van toepassing persoonlijke website
This commit is contained in:
parent
b6b7317e57
commit
c8ef81fc80
|
@ -1,8 +1,31 @@
|
||||||
{{ $author := index .Site.Data.personen (substr $.File.LogicalName 0 -3) }}
|
{{ $author := index .Site.Data.personen (substr $.File.LogicalName 0 -3) }}
|
||||||
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
|
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
|
||||||
|
{{ $sameas := slice }}
|
||||||
|
{{ if $author.sameas }}{{ $sameas = $sameas | append ($author.sameas) }}{{ end }}
|
||||||
|
{{ if $author.websites }}
|
||||||
|
{{ range index ($author.websites) }}
|
||||||
|
{{ if eq .sameas true }}
|
||||||
|
{{ $sameas = $sameas | append (.url) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $author.social }}
|
||||||
|
{{ if $author.social.github }}
|
||||||
|
{{ $sameas = $sameas | append (printf "https://github.com/%s" $author.social.github) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $author.social.linkedin }}
|
||||||
|
{{ $sameas = $sameas | append ($author.social.linkedin) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $author.social.mastodon }}
|
||||||
|
{{ $sameas = $sameas | append ($author.social.mastodon_url) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if $author.social.twitter }}
|
||||||
|
{{ $sameas = $sameas | append (printf "https://twitter.com/%s" $author.social.twitter) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
"@context": "https://www.schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"@id": "{{ .Permalink }}#person",
|
"@id": "{{ .Permalink }}#person",
|
||||||
"url": "{{ .Permalink }}",
|
"url": "{{ .Permalink }}",
|
||||||
|
@ -11,7 +34,9 @@
|
||||||
"affiliation": [
|
"affiliation": [
|
||||||
{
|
{
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "{{ $.Site.Params.organization_name | default .Site.Params.textEmptyValue }}",
|
"id": "{{ .Site.BaseURL }}#organization",
|
||||||
|
"url": "{{ .Site.BaseURL }}",
|
||||||
|
"name": "{{ .Site.Title }}",
|
||||||
"sameAs": {{ .Site.Params.organization_sameas }}
|
"sameAs": {{ .Site.Params.organization_sameas }}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -27,7 +52,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $author.sameas }}"sameAs": "{{ $author.sameas }}",{{ end }}
|
{{ if $sameas }}
|
||||||
|
"sameAs": [{{ range $i, $e := $sameas }}{{ if $i }}, {{ end }}"{{ $e }}"{{ end }}],
|
||||||
|
{{ end }}
|
||||||
{{ if $author.address }}
|
{{ if $author.address }}
|
||||||
"address": {
|
"address": {
|
||||||
"@type": "PostalAddress",
|
"@type": "PostalAddress",
|
||||||
|
@ -41,6 +68,10 @@
|
||||||
"@id": "{{ .Permalink }}#profilepage",
|
"@id": "{{ .Permalink }}#profilepage",
|
||||||
"url": "{{ .Permalink }}",
|
"url": "{{ .Permalink }}",
|
||||||
"name": "{{ .Title }}",
|
"name": "{{ .Title }}",
|
||||||
|
"mainContentOfPage": {
|
||||||
|
"@type": "WebPageElement",
|
||||||
|
"cssSelector": ".content"
|
||||||
|
},
|
||||||
"speakable": {
|
"speakable": {
|
||||||
"@type": "SpeakableSpecification",
|
"@type": "SpeakableSpecification",
|
||||||
"cssSelector": ".speakable"
|
"cssSelector": ".speakable"
|
||||||
|
|
Reference in a new issue