I am just getting started with Netlify CMS and I am confused how to update the CMS once my admin/config.yml
changes
I cloned the default Hugo project and I modified some of the config.yml
file fields for the home page and wired them up correctly in the index.html. The generated static file looks correct.
However, when I go to the CMS (/admin
), I only see the old index.html content (in the CMS Preview section). So I renamed the js
folder and copied only the app.js
file into a fresh js
folder. But that breaks things saying cms.js
is missing. I added the old one but it did not pick up the cms-preview-templates
.
I thought all of this will get generated from the config.yml
.. Do I need to manually edit the JS files to setup the CMS? Or is it possible to regen all the files once config.yml
and the associated html files change?
The help page on setting up your own site does not say much about editing the template.
Update
I see cms.js
file has some content like this:
import HomePreview from "./cms-preview-templates/home";
import PostPreview from "./cms-preview-templates/post";
import ProductsPreview from "./cms-preview-templates/products";
import ValuesPreview from "./cms-preview-templates/values";
import ContactPreview from "./cms-preview-templates/contact";
and when I go check these files (master
branch), they have the content from the original sample project and does not have the changes I made. What do I need to do to automatically update these template files as I make changes to my site (corresponding changes are in the admin/config.yml
file)?
Thanks!