192.168.0.2/themes/neff/layouts/partials/schema/localbusiness.jsonld

37 lines
1.2 KiB
Plaintext
Executable File

{
"@context": "http://schema.org",
"@type": "LocalBusiness",
"url": "{{ .ctx.Site.BaseURL }}",
"name": "{{ .contact.name }}",
"email": "{{ .contact.email }}",
"telephone": {{ .contact.telephone | jsonify }},
{{ if (ne .short true) }}
{{- with .contact.faxNumber -}}
"faxNumber": {{ . | jsonify }}
{{- end -}},
"address": {{ partial "schema/address.jsonld" (dict "address" .contact.address "ctx" .ctx)}},
"logo": {{ partial "schema/image.jsonld" (dict "url" "/img/logo.png" "ctx" .ctx) }},
"image": {{ partial "schema/image.jsonld" (dict "url" "/img/logo.png" "ctx" .ctx) }},
"openingHours": {{ jsonify .contact.openingHours }},
"priceRange": "$$$",
"geo": {
"@type": "GeoCoordinates",
"latitude": {{ .contact.geo.lat }},
"longitude": {{ .contact.geo.lon }}
}
{{ with .contact.social }}
{{- $social := slice -}}
{{- with .facebook }}
{{- $social = $social | append . }}
{{- end }}
{{- with .instagram }}
{{- $social = $social | append . }}
{{- end }}
{{- with .twitter }}
{{- $social = $social | append . }}
{{- end }}
,"sameAs": {{ jsonify $social }}
{{- end }}
{{- end }}
}