7
0
Fork 0
This repository has been archived on 2024-10-15. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity_website_archive/themes/nluug/layouts/partials/schemas/schema_WebSite.html

119 lines
3.8 KiB
HTML
Raw Normal View History

{{ $baseUrl := .Site.BaseURL }}
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
<script type="application/ld+json">
[
{
"@context": "https://schema.org",
"@type": "Webpage",
"specialty": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}",
"mainContentOfPage": {
"@context": "https://schema.org/",
"@type": "WebPageElement",
"cssSelector": ".body-contentTODO"
},
"primaryImageOfPage": "{{ .Site.Params.imageurl | absURL }}"
},
{
"@context": "https://schema.org",
"@type": "WebSite",
"@id": "{{ .Site.BaseURL }}",
"additionalType": ["CreativeWork", "Person"],
"url": "{{ .Site.BaseURL }}",
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
"alternateName": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
"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 }}",
"description": "{{ .Site.Params.description }}",
"disambiguatingDescription": "{{ .Site.Params.description | default .Site.Params.textNoTitle }}",
"isFamilyFriendly": "True",
"sourceOrganization": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
"publisher": {
"@type": "Organization",
"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"
}
},
"potentialAction": {
"@type": "SearchAction",
"target": "{{ .Site.BaseURL }}?search={search_term}",
"query-input": "required name=search_term"
},
"keywords":[
{{ range $i, $e := .Site.Params.keywords }}{{ if $i }}, {{ end }}"{{ $e }}"{{ end }}
],
"hasPart": [
{
"@context": "http://schema.org/",
"@type": "WPHeader",
"@id": "#header",
"headline": "{{ .Site.Params.description }}",
"cssSelector": "#header",
"potentialAction": [{{ range $i, $e := .Site.Menus.actions }}{{ if $i }}, {{ end }}
{
"@type": "Action",
"name": "{{ $e.Title }}",
"target": "{{ $e.URL | absURL }}"
}
{{- end -}}
],
"@graph":
[{{ range $i, $e := .Site.Menus.main }}{{ if $i }}, {{ end }}
{
"@context": "https://schema.org",
"@type":"SiteNavigationElement",
"@id":"#header",
"name": "{{ $e.Title }}",
"url": "{{ $e.URL | absURL }}"
}
{{- end -}}
]
},
{
"@context": "http://schema.org/",
"@type": "WPSidebar",
"cssSelector": "#sidebar",
"citation": [
{{ range $i, $e := .Site.Menus.main }}{{ if $i }}, {{ end }}"{{ $e.URL | absURL }}"{{ end }}
]
},
{
"@context": "http://schema.org/",
"@type": "WPFooter",
"cssSelector": ".footer",
"@id": "#footer",
"copyrightHolder":"{{ .Site.Title }}",
"publisher": "{{ .Site.Title }}",
"copyrightYear":"{{ now.Format "2006"}}"
}
]
}
]
</script>