Hugo website CMS
Tags: webdev, hugo, netlify, go
Published: 2020-06-25 11:29:49

## Introduction

In my previous post, I successfully deployed a Hugo static site through Netlify, you can read all about it [here](https://dev.to/manuelfs12/the-road-to-the-first-blog-75i). I managed to create the post with ease using Markdown, but, despite the relative simplicity, it got me thinking. Is there some kind of Content Management System (CMS) for static sites? To my surprise, YES there is, but before we get all excited and dive in into this, lets put up some context of what a CMS is, and why it could help you with your own blogs.

---

## What is a Content Management System?

A Content Management System (CMS for short) is a software application that allows users to build and manage a website without having to code it from scratch, one of the big ones in the CMS space is Wordpress, you can easily create a websites and also content for it. The CMS are usually a little to no code solution for people who wants to have a website without dealing with the complexities of web technologies like HTML/CSS, JavaScript, PHP etc.

In this case, I’m looking for a different way of managing my content, don’t get me wrong, I like how I set my blog site up, and writing in Markdown is really cool, but if I can find a way to enhance it, I’m all in for it. The Hugo website has some recommendations for CMS, you can check out in the [documentation](https://gohugo.io/tools/frontends/).

After glancing over the different suggestions, the one that caught my eye was **Netlify CMS**, it is funny because I am starting to feel like a Netlify fanboy, but hey, they make interesting stuff.

---

## Netlify CMS

> Netlify CMS is an open source content management system for your Git workflow that enables you to provide editors with a friendly UI and intuitive workflows. You can use it with any static site generator to create faster, more flexible web projects.

Sounds fun, for this experiment I’ll be implementing it on an existing Hugo site.
If you want to learn more about Netlify CMS you can check it out [here](https://www.netlifycms.org/).

### Adding the CMS on an existing Hugo site

For the purpose of this post, I’ll use the Hugo [quickstart](https://gohugo.io/getting-started/quick-start/) site, you should have something like this.

![Basic Hugo website](https://dev-to-uploads.s3.amazonaws.com/i/8p416olz2s5w3k3l8790.png)

Now, let’s deploy our site through Netlify, I went with it due to its ease of use and the fact that I deployed [my blog](https://manudevbits.com/) through it. You can use Netlify CMS with other hosting solutions, but I’ll be using Netlify since I already know the very basics of it. If you want to know how I did it for my blog, check out this [post](https://manudevbits.com/the-road-to-the-first-blog/), or you can always check the documentation [here](https://docs.netlify.com/).

With the site deployed, It’s time to start implementing Netlify CMS.

I followed the [instructions](https://www.netlifycms.org/docs/add-to-your-site/) from the documentation, and I have to say, it was really easy to implement, the documentation was easy to follow, and I had the CMS on production very quickly. Keep in mind that I did host the site on Netlify which made it easier, so you millage may vary depending on the host you choose.

**Here is the admin panel working on the website**

![Admin panel on the website](https://dev-to-uploads.s3.amazonaws.com/i/44ftw4kghf4hfpcmnlob.png)

**Create Post page**

![Create post page](https://dev-to-uploads.s3.amazonaws.com/i/2l8o9tkew0j9ec500rjv.png)

I also tested the **Editorial Workflow** which is available on GitHub hosted repositories and it is on beta for GitLab and Bitbucket. This lets me save drafts, review changes and publish when the article is ready.

![Workflow page](https://dev-to-uploads.s3.amazonaws.com/i/pextvoujhlnxg74s5jjf.png)

Now, I will hit publish, this will create a new commit on our master branch, that Netlify will take and deploy.

![Live site](https://dev-to-uploads.s3.amazonaws.com/i/vlcag0uhjw9l8cv7a668.png)

**A great success!!**

---

## Closing thoughts

I enjoyed this experiment a lot, a CMS can certainly help you if you need some visual aid while editing content, or you simply don’t want to deal with Markdown directly. Netlify CMS was a surprise for me, because I thought it would be way harder to implement, but thankfully it wasn’t, and I will have on the back of my head if I ever need to make another website with a static site generator and need a CMS. Maybe in the future, I’ll try another CMS, or another static site generator, but for now, I’m really happy with my current setup, Hugo, Markdown, VS Code and Netlify.

Hope to see you around for my next post.