feat: enable multiple contact widgets

Move contact params from params.yaml to contact widget

SEO contact details (phone, address, coords) now under params.yaml > marketing > seo

See #2601
This commit is contained in:
George Cushen committed 2022-02-14 21:22:54 +00:00
1 parent ec6d170ce4
commit 7080641443
3 files changed
+9 -8

No files matched your search

+3 -2
View File
@@ -31,6 +31,7 @@ Built upon the open source [Netlify CMS](https://www.netlifycms.org/) and [Netli
3. (Optional) If your Git repository's branch is **not** `main`, define it in `config/_default/params.yaml`:
```yaml
cms:
branch: master
extensions:
cms:
branch: master
```
@@ -7,14 +7,14 @@
"name": {{site.Params.marketing.seo.org_name | default site.Title}},
"logo": {{ partial "functions/get_logo_url" . }},
{{with $sharing_image}}"image": {{.Permalink}},{{end}}
{{ if (eq site.Params.marketing.seo.site_type "LocalBusiness") | and site.Params.coordinates }}
{{ if (eq site.Params.marketing.seo.site_type "LocalBusiness") | and site.Params.marketing.seo.coordinates }}
"geo": {
"@type": "GeoCoordinates",
"latitude": {{site.Params.coordinates.latitude}},
"longitude": {{site.Params.coordinates.longitude}}
"latitude": {{site.Params.marketing.seo.coordinates.latitude}},
"longitude": {{site.Params.marketing.seo.coordinates.longitude}}
},
{{end}}
{{ with site.Params.address }}
{{ with site.Params.marketing.seo.address }}
"address": {
"@type": "PostalAddress",
"streetAddress": {{ .street | default "" }},
@@ -24,7 +24,7 @@
"addressCountry": {{ .country_code | default .country | default "" }}
},
{{end}}
{{ with site.Params.phone }}"telephone": {{.}},{{end}}
{{ with site.Params.marketing.seo.phone }}"telephone": {{.}},{{end}}
"url": {{site.BaseURL}}
}
</script>
@@ -1,7 +1,7 @@
{{ $ := .root }}
{{ $st := .page }}
{{ $autolink := default true $st.Params.content.autolink }}
{{ $data := site.Params }}
{{ $data := $st.Params.content }}
{{ $form_provider := lower $st.Params.content.form.provider | default "" }}
{{ $form_provider_legacy := $st.Params.email_form | default 0 }}