Browse Source

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
George Cushen 2 years ago
parent
commit
7080641443

+ 3 - 2
wowchemy-cms/README.md

@@ -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
    ```

+ 5 - 5
wowchemy/layouts/partials/jsonld/business.html

@@ -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 - 1
wowchemy/layouts/partials/widgets/contact.html

@@ -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 }}