{{ with $page.Title }}{{ . | markdownify }}{{ end }}
{{ with $page.Params.subtitle }}
{{ . | markdownify }}
{{ end }}
{{ with $page.Content }}{{ . }}{{ end }}
{{ if $page.Params.email_form }}
{{ $post_action := "" }}
{{ if eq $page.Params.email_form 1 }}
{{ $post_action = "netlify" }}
{{ else }}
{{ if not $data.email }}
{{ errorf "Please set an email address for the contact form using the `email` parameter in `params.toml`. Otherwise, set `email_form = 0` to disable the contact form." }}
{{ end }}
{{ $post_action = printf "action=\"https://formspree.io/%s\"" $data.email }}
{{end}}
{{end}}
{{ if and $data.email (not $page.Params.email_form) }}
{{- if $autolink }}{{ $data.email }}{{ else }}{{ $data.email }}{{ end -}}
{{ end }}
{{ with $data.phone }}
{{- if $autolink }}{{ . }}{{ else }}{{ . }}{{ end -}}
{{ end }}
{{ $addr_formatted := "" }}{{/* Scoping for maps. */}}
{{ if $data.address.street | or $data.address.city | or $data.address.region | or $data.address.postcode | or $data.address.country }}
{{ $addr_formatted = partial "functions/get_address" (dict "root" . "address" $data.address) }}
{{$addr_formatted}}
{{ end }}
{{ with $data.directions }}
{{ . | markdownify | emojify }}
{{ end }}
{{ with $data.office_hours }}
{{- if not (reflect.IsSlice .)}}{{/* Support legacy string format. */}}
{{- . | markdownify | emojify -}}
{{else}}
{{- delimit . " " | markdownify | emojify -}}
{{end -}}