Hi there! I’m new to Netlify CMS and Hugo. So what I’m trying to achieve is to create a “file” collection called “settings” where I can define global variables like site logo, phone, email etc and use it in header and footer on every page of the site. So what is the best way to do this with Netlify CMS and Hugo and how this front matter could be accessed from any site html page?
Here is my example of config.yml
# when using the default proxy server port
local_backend: true
backend:
name: git-gateway
branch: master # Branch to update (optional; defaults to master)
media_folder: static/uploads
public_folder: /uploads
collections: # A list of collections the CMS should be able to edit
- name: "settings"
label: "Settings"
files:
- file: "content/site-settings.yml"
label: "Global Settings"
name: "globalSettings"
fields:
- {label: "Logo", name: "logo", widget: "image"}
- {label: "Description", name: "description", widget: "text"}
- {label: "Google Tag Manager ID", name: "gtm_id", widget: "text"}
- {label: "Phone", name: "phone", widget: "text"}
- {label: "Email", name: "mailto", widget: "text"}
- {label: "Plhtcxt", name: "plhtcxt", widget: "text"}
- {label: "Country", name: "country", widget: "text"}
I used something like this
{{ .Params.globalSettings.phone }}
{{ .Params.settings.globalSettings.phone }}
{{ .settings.globalSettings.phone }}
… and many many other variations
But this obviously does not work))