forked from laurens/fediversity_website
Wijzigingen voor inbouwen ondersteuning Schema.org-structuren
This commit is contained in:
parent
9186ffe090
commit
30ac449de6
|
@ -15,11 +15,5 @@
|
|||
{{ partialCached "style.html" . }}
|
||||
|
||||
<!-- Schema.org opmaak -->
|
||||
{{ if .IsHome -}}
|
||||
{{ partial "schemas/schema_WebSite.html" . }}
|
||||
{{- else if .IsPage -}}
|
||||
{{ if or (in .Params.content_types "Person") }}
|
||||
{{ partial "schemas/schema_Person.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "schemas/include-relevant-schemas.html" . }}
|
||||
</head>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{{ if .IsHome -}}
|
||||
|
||||
{{ partial "schemas/schema_Organization.html" . }}
|
||||
{{ partial "schemas/schema_WebSite.html" . }}
|
||||
|
||||
{{- else if .IsPage -}}
|
||||
|
||||
{{ if or (in .Params.content_types "Person") }}
|
||||
{{ partial "schemas/schema_Person.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
|
@ -0,0 +1,8 @@
|
|||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "Organization",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"logo": "{{ .Site.Params.logoHiRes | absURL | default .Site.Params.textEmptyValue }}"
|
||||
}
|
||||
</script>
|
|
@ -3,22 +3,12 @@
|
|||
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://www.schema.org",
|
||||
"@context": "https://www.schema.org",
|
||||
"@type": "Person",
|
||||
"@id": "{{ .Permalink }}",
|
||||
"name": "{{ $author.name }}",
|
||||
"name": "{{ $author.name | default .Site.Params.textEmptyValue }}",
|
||||
"alternateName": "{{ $author.name }}",
|
||||
{{ if $author.nationality }}"nationality": "{{ $author.nationality }}",{{ end }}
|
||||
{{ if $author.address }}
|
||||
"birthPlace" : {
|
||||
"@type": "Place",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"addressLocality": "{{ $author.address.city }}",
|
||||
"addressRegion": "{{ $author.address.region }}",
|
||||
"addressCountry": "{{ $author.address.country }}"
|
||||
}
|
||||
},{{ end }}
|
||||
"affiliation": [
|
||||
{
|
||||
"@type": "Organization",
|
||||
|
@ -27,15 +17,6 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
{{ if $author.education }}
|
||||
"alumniOf": [
|
||||
{
|
||||
"@type": "CollegeOrUniversity",
|
||||
"name": "{{ $author.education.university }}",
|
||||
"sameAs": "{{ $author.education.url }}"
|
||||
}
|
||||
],
|
||||
{{ end }}
|
||||
{{ if $author.gender }}"gender": "{{ $author.gender }}",{{ end }}
|
||||
{{ if $author.jobfunction }}"Description": "{{ $author.jobfunction }}",{{ end }}
|
||||
{{ if $author.description }}"disambiguatingDescription": "{{ $author.description }},{{ end }}
|
||||
|
@ -43,7 +24,7 @@
|
|||
"worksFor": [
|
||||
{
|
||||
"@type": "Organization",
|
||||
"name": "{{ .Site.Params.name }}",
|
||||
"name": "{{ .Site.Params.name | default .Site.Params.textEmptyValue }}",
|
||||
"sameAs": [ {{ partial "schemas/schema_Social.html" .Site.Params }}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Webpage",
|
||||
"specialty": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}",
|
||||
"specialty": "{{ .Site.Params.description | default .Site.Params.textEmptyValue }}",
|
||||
"mainContentOfPage": {
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "WebPageElement",
|
||||
"cssSelector": ".body-contentTODO"
|
||||
},
|
||||
"primaryImageOfPage": "{{ .Site.Params.imageurl | absURL }}"
|
||||
"primaryImageOfPage": "{{ .Site.Params.imageurl | absURL | default .Site.Params.textEmptyValue }}"
|
||||
},
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
|
|
Reference in a new issue