Files
HugoBlox-kit/layouts/partials/jsonld/business.html
T
George Cushen d9ff93a1c2 feat: make media library dir configurable
Move default media library from static/img/ to static/media/ as it can now contain audio, video, and other kinds of media in addition to images.

BREAKING CHANGE:
Either rename your site's static/img/ to static/media/ (and update any references to this folder in your Markdown files);

Or, add `media_dir = "img"` to `params.toml` to continue using the legacy location.
2020-07-29 18:54:28 +01:00

30 lines
1.1 KiB
HTML

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": {{site.Params.local_business_type | default site.Params.site_type}},
"@id": {{site.BaseURL}},
"name": {{site.Params.org_name | default site.Title}},
"logo": {{ partial "functions/get_logo_url" . }},
{{with site.Params.sharing_image}}"image": {{printf "%s/%s" ($.Scratch.Get "media_dir") . | absURL}},{{end}}
{{ if (eq site.Params.site_type "LocalBusiness") | and site.Params.coordinates }}
"geo": {
"@type": "GeoCoordinates",
"latitude": {{site.Params.coordinates.latitude}},
"longitude": {{site.Params.coordinates.longitude}}
},
{{end}}
{{ with site.Params.address }}
"address": {
"@type": "PostalAddress",
"streetAddress": {{ .street | default "" }},
"addressLocality": {{ .city | default "" }},
"addressRegion": {{ .region | default "" }},
"postalCode": {{ .postcode | default "" }},
"addressCountry": {{ .country_code | default .country | default "" }}
},
{{end}}
{{ with site.Params.phone }}"telephone": {{.}},{{end}}
"url": {{site.BaseURL}}
}
</script>