0

I'm interested in using Netlify CMS however it seems that it's only really for blog posts. Is it possible to also use it for the actual static website content?

For example:

  • Defining the <h1> text on the homepage
  • Defining the text for a specific <button> on the Contact Us page
  • Defining which background image to use in the About Us fold section
  • Saving default variables that can be used throughout the app, e.g. "primaryColor", "websiteName", "supportEmailAddress", etc.
  • Defining the links to be used in the navigation bar

I've installed Netlify CMS with a Gatsby site but I can't figure out how to do this. All the online guides only mention creating blog posts and I can't find any relevant information within the Netlify CMS documentation.

What settings do I need so that only one entry can be created for a collection? There shouldn't be multiple entries for "Homepage Layout" for example, just the one single entry with all the relevant information.

If I want to save variables to a json file (e.g. "primaryColor") so that the rest of my app can use it, then I'll need to already have that file created with a default value or else the app won't compile (so I won't even be able to access the /admin page to update the variables). What's the best way to handle this?

Basically, I'm looking for either some documentation or an online guide on how to use NetlifyCMS for non-blog sites in a similar way that the Wordpress Advanced Custom Fields plugin works. Is this even possible?

Jake
  • 3,865
  • 5
  • 25
  • 58

1 Answers1

0

Check out this Post. There is an example on how to setup a Page with Netlify CMS and Gatsby.

Blogpost:

https://blog.logrocket.com/gatsby-netlify-cms-a-perfect-pairing-d50d59d16f67/

Demo:

https://gatsby-netlify-cms-example.netlify.com/

Daniel
  • 109
  • 1
  • 9
  • That blogpost only describes adding blog content, however I found [this blogpost](https://www.frontendstumbles.com/gatsby-and-netlify-cms-tutorial/) that describes how to add page content. The key is that the collection should be of type `files` instead of `folder`. – Jake Aug 16 '19 at 09:18