Updating NetlifyCMS

April 24, 2020
2 minutes

Ok! I felt pretty bad neglecting the webpage, considering that I do enjoy the Hermit theme and the overall Hugo structure.

One of my major issues was that I set this up with a 1-click deployment within Netlify. This was nice for a couple of reasons:

I managed to initially hack around the files enough to change the theme and add my own content, but there was tons of sprinklings of placeholder formats, posts, and silly things like shopping cart items.

The project also had a bunch of javascript files that I had no idea what they did.

So! To safely make some changes, I created a new branch in my repo.

Then to test it out without affecting the site, I decided to add the branch as part of the pipeline in Netlify settings:

  1. Go to Build & deploy
  2. Continous Deployment
  3. Deploy contexts
  4. Branch deploys: (branch name)

After carefully reading the docs for NetlifyCMS, I started incorporating all the instructions on the page, with only the minor adjustment to the page was to add the Netlify Identity widget within my page with the layouts/partials/extra-head.html.

This meets the requirements of adding it to the head of my main page, but it also has an unfortunate effect of adding it to every single head throughout the site. I think due to caching it won’t affect performance, but I should clean it up more elegantly in the future.

The fact that this post is here means that my short lived branch was successful and now merged back to the master.

With that being said, hopefully I’ll be posting from my web interface moving forward!!!