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

92 lines
3 KiB
HTML
Raw Permalink Normal View History

{{ $baseUrl := .Site.BaseURL }}
{{ $location := index .Site.Data.location .Site.Params.primarylocation }}
{{ $logoresource := resources.Get ($.Site.Params.logoNormal | replaceRE "^/" "") }}
2023-06-23 11:38:52 +02:00
{{ $keywords := .Site.Params.keywords }}
<script type="application/ld+json">
[
{
"@context": "https://schema.org",
"@type": "WebSite",
"@id": "{{ .Site.BaseURL }}#website",
"additionalType": ["CreativeWork"],
"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 }}",
{{ if .Site.Params.imageurl }}"image": "{{ .Site.Params.imageurl | absURL | default .Site.Params.textNoTitle }}",{{ end }}
"inLanguage": "{{ .Site.LanguageCode }}",
"author": "{{ .Site.Params.author | default .Site.Params.textNoValue }}",
"description": "{{ .Site.Params.description }}",
"disambiguatingDescription": "{{ .Site.Params.description | default .Site.Params.textNoValue }}",
"isFamilyFriendly": "True",
"sourceOrganization": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
"publisher": {
"@type": "Organization",
"name": "{{ .Site.Title | default .Site.Params.textNoTitle }}",
"logo": {
"@type": "ImageObject",
"url": "{{ $logoresource.Permalink | default .Site.Params.textNoValue }}",
"height": "{{ printf "%d" $logoresource.Height }}",
"width": {{ printf "%d" $logoresource.Width }}
}
},
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "{{ absURL "/zoeken/" }}?q={search_term_string}"
},
"query-input": "required name=search_term_string"
},
"keywords":[
2023-06-23 11:38:52 +02:00
{{ range $i, $e := $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>