business.html 1.2 KB

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