business.html 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <script type="application/ld+json">
  2. {
  3. "@context": "https://schema.org",
  4. "@type": {{site.Params.local_business_type | default site.Params.site_type}},
  5. "@id": {{site.BaseURL}},
  6. "name": {{site.Params.org_name | default site.Title}},
  7. "logo": {{ partial "functions/get_logo_url" . }},
  8. {{with site.Params.sharing_image}}"image": {{printf "%s/%s" ($.Scratch.Get "media_dir") . | absURL}},{{end}}
  9. {{ if (eq site.Params.site_type "LocalBusiness") | and site.Params.coordinates }}
  10. "geo": {
  11. "@type": "GeoCoordinates",
  12. "latitude": {{site.Params.coordinates.latitude}},
  13. "longitude": {{site.Params.coordinates.longitude}}
  14. },
  15. {{end}}
  16. {{ with site.Params.address }}
  17. "address": {
  18. "@type": "PostalAddress",
  19. "streetAddress": {{ .street | default "" }},
  20. "addressLocality": {{ .city | default "" }},
  21. "addressRegion": {{ .region | default "" }},
  22. "postalCode": {{ .postcode | default "" }},
  23. "addressCountry": {{ .country_code | default .country | default "" }}
  24. },
  25. {{end}}
  26. {{ with site.Params.phone }}"telephone": {{.}},{{end}}
  27. "url": {{site.BaseURL}}
  28. }
  29. </script>