forked from laurens/fediversity_website
Invullen van meer velden voor Schema.org
This commit is contained in:
parent
88c465f593
commit
49337eba68
|
@ -1,8 +1,26 @@
|
|||
{{ $logoresource := resources.Get ($.Site.Params.logoNormal | replaceRE "^/" "") }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "Organization",
|
||||
"@type": "NGO",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"logo": "{{ .Site.Params.logoHiRes | absURL | default .Site.Params.textEmptyValue }}"
|
||||
"name": "{{ .Site.Title }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ $logoresource.Permalink | default .Site.Params.textNoValue }}",
|
||||
"height": "{{ $logoresource.Height }}",
|
||||
"width": {{ printf "%d" $logoresource.Width }}
|
||||
},
|
||||
{{- with .Site.Params.address -}}
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "{{ .street | default .Site.Params.textNoValue }}",
|
||||
"addressLocality": "{{ .city | default .Site.Params.textNoValue }}",
|
||||
"addressRegion": "{{ .region | default .Site.Params.textNoValue }}",
|
||||
"addressCountry": "{{ .country | default .Site.Params.textNoValue }}",
|
||||
"postalCode": "{{ .postalcode | default .Site.Params.textNoValue }}"
|
||||
},
|
||||
{{- end -}}
|
||||
"telephone":"{{ .Site.Params.phone }}"
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{{ $baseUrl := .Site.BaseURL }}
|
||||
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
|
||||
{{ $logoresource := resources.Get ($.Site.Params.logoNormal | replaceRE "^/" "") }}
|
||||
|
||||
<script type="application/ld+json">
|
||||
[
|
||||
{
|
||||
|
@ -24,9 +26,9 @@
|
|||
"headline": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}",
|
||||
"image": "{{ .Site.Params.imageurl | absURL | default .Site.Params.textNoTitle }}",
|
||||
"inLanguage": "{{ .Site.LanguageCode }}",
|
||||
"author": "{{ .Site.Params.author | default .Site.Params.textNoTitle }}",
|
||||
"author": "{{ .Site.Params.author | default .Site.Params.textNoValue }}",
|
||||
"description": "{{ .Site.Params.description }}",
|
||||
"disambiguatingDescription": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}",
|
||||
"disambiguatingDescription": "{{ .Site.Params.description | default .Site.Params.textNoValue }}",
|
||||
"isFamilyFriendly": "True",
|
||||
"sourceOrganization": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
|
||||
"publisher": {
|
||||
|
@ -34,36 +36,18 @@
|
|||
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.Params.logourl | absURL | default .Site.Params.textNoTitle }}",
|
||||
"height": 60,
|
||||
"width": 107
|
||||
}
|
||||
},
|
||||
"mainEntity": {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "localBusiness",
|
||||
"name": "{{ .Site.Title }}",
|
||||
"image":"{{ $location.thumbnail | absURL }}",
|
||||
"priceRange":"{{ .Site.Params.pricerange }}",
|
||||
"telephone":"{{ .Site.Params.phone }}",
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"streetAddress": "{{ $location.address.street }}",
|
||||
"addressLocality": "{{ $location.address.city }}",
|
||||
"addressRegion": "{{ $location.address.region }}",
|
||||
"addressCountry": "{{ $location.address.country }}",
|
||||
"postalCode": "{{ $location.address.postalcode | default .Site.Params.textNoTitle }}"
|
||||
},
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "4.5",
|
||||
"reviewCount": "50"
|
||||
"url": "{{ $logoresource.Permalink | default .Site.Params.textNoValue }}",
|
||||
"height": "{{ printf "%d" $logoresource.Height }}",
|
||||
"width": {{ printf "%d" $logoresource.Width }}
|
||||
}
|
||||
},
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": "{{ .Site.BaseURL }}?search={search_term}",
|
||||
"query-input": "required name=search_term"
|
||||
"target": {
|
||||
"@type": "EntryPoint",
|
||||
"urlTemplate": "{{ absURL "/zoeken/" }}?q={search_term_string}"
|
||||
},
|
||||
"query-input": "required name=search_term_string"
|
||||
},
|
||||
"keywords":[
|
||||
{{ range $i, $e := .Site.Params.keywords }}{{ if $i }}, {{ end }}"{{ $e }}"{{ end }}
|
||||
|
|
Reference in a new issue