How to Make a Hugo Blog
Table of Contents
Introduction#
Howdy! So we recently went through the process of making this website, and I had a few frustrations with the guide we followed. This guide aims to be easy to use, and guide you on how to get a blog started with as little effort as possible, AND add a frontend that can easily be accessed anywhere to edit content using Decap CMS. Currently, there is an issue with Decap CMS’s Slate Rich Text Editor which… causes crashing if you backspace a bullet point. This can be circumvented by using the Markdown Editor instead, which is built in by default, or by simply not using bullet points! Soren attempted using a replacement for Decap CMS, known as Sveltia CMS, however authentication issues caused this to not be a good option for the time being. We will make an updated post if the authentication issues are resolved! Credit to Arsh Sharma for the original guide, which can be found here: Building a Blog With a CMS Using Hugo and Netlify
Requirements#
- Git + GitHub Desktop (GitHub Desktop will install Git. It’s worth noting that a GitHub account is also required.)
- Hugo Extended (At minimum, v0.90.x. is required for this guide. Ideally, use the most up to date release.)
- Go
- A Netlify Account
- A Hugo Theme (This guide will focus on using the Terminal theme, which this website currently uses!
Getting Started#
To get started, we’ll be creating a new site locally using Hugo! Hugo is a static site generator which allows you to make extremely lightweight and fast websites. This does however come at the expense of usually not allowing for many responsive elements. Regardless, it makes for an excellent blogging or showcase framework!
Now, let’s go ahead and get our site started! You can run this command anywhere, though preferably somewhere you can easily access:
hugo new site my-blog
cd my-blog
With these two commands, you should now have your terminal pointing at your new site. Now, let’s go ahead and add a theme! As stated above, we used Terminal, though you may use any theme you’d like! The general ideas of this guide should carry over to most themes, specifically those added as a git submodules. Now, let’s go ahead and initiate our git repository, and then add our theme with the following two commands!
git init
git submodule add -f https://github.com/panr/hugo-theme-terminal.git themes/terminal
Please note that in some situations, you may encounter an error when installing your Terminal theme. In the rare situation you encounter an error, please remove theme = "terminal" from your config file.
If no errors were encountered, please ensure that within your Hugo configuration file, (typically, hugo.toml, in this case), you have theme = "terminal". This will allow your website to load your theme!
If you’d like to take a look, you can run:
hugo server
This will serve your website at http://localhost:1313/. However, things look rather… Empty.

Configuration#
No worries! This is due to the fact that our Hugo configuration file is still rather empty. Let’s go ahead and add some parameters! We can copy the example from Terminal’s repo, or you can use the following. I’ve added in a few extra comments, however I highly advise reviewing Terminal’s documentation for even more information.
The above configuration file should be enough to get you started, and start displaying your post! Oh, wait… we haven’t made any post yet!
As a final test before we get into Netlify deployment and Decap CMS integration, let’s make sure that post are being displayed. We can easily do this by making a new post.
hugo new posts/hi-there/index.md
You can then open the “index.md”, file with any text editor, and edit anything you please! Though, it’s not necessary to worry about this too much at the moment. Once we get into Decap, you will not be meddling too much with the frontmatter.
As an additional treat, you can go to https://panr.github.io/terminal-css/, to create your own custom color scheme for Terminal! It’s extremely convenient, and all you need to do is follow the steps.

Deploying to Netlify#
Decap CMS has nearly seamless integration with Netlify; which is to be expected as they are the ones who open sourced the project. Firstly, create a GitHub repo, and commit and push your local git repo to it. This can easily be done with GitHub Desktop, which allows you to link your account, select a local repo, and upload it to GitHub.
WARNING: Before uploading: Please rename hugo.toml , to, config.toml. Netlify expects these parameters, and will fail to build if this is not changed.#
Once your GitHub repo is uploaded, you can chose to either have it public or private. Since we’ll be using Netlify for authentication, privacy settings are not important.
Netlify will then allow you to create a website through an existing GitHub repo. Netlify will also automatically detect that you are importing a Hugo project, and populate the build instructions. Simply follow the steps provided, and your website will be then be hosted.
Adding Decap CMS#
This is potentially the most important step, as it will allow us to go ahead and allow us to add an open source frontend interface known as Decap CMS. You can read all about it on their site, and their documentation. This guide will not go into specifics regarding widgets and such for the sake of simplicity. It is highly advised to review the documentation for additional insight.
The first step here will be to create and admin folder inside of the static folder located in the root of your website. Within this admin folder, you’ll need to create:
index.html
Second, you’ll need to add your config.yml . This file will dictate how Decap CMS creates new content on your website, and necessary pathing. Please feel free to use the following configuration, which was made for use in Terminal.
config.yml
As a short explanation, widgets allow us to add information to our post’s frontmatter. This allows us to then edit the fields to our liking. You can read more about widgets, here.
Intermission#
Before we move on, I would advise taking this opportunity to also add in your Netlify authentication widgets. One has already been added above:
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
Another must be added to the <head> section of your website. Since we’re using a custom theme, you must copy your files over to /layouts/partials/
For this theme, you may use the following files, which were copies from the original theme’s layout folder, and edited to add in the widget.
head.html
baseof.html
Netlify Identity#
Now that we’ve gone ahead and added in Decap CMS and our authentication widgets, let’s enable Identity through Netlify. This will allow us to edit our content through Decap CMS, and push changes into our repository, which will then be reflected on our website.
Simply click on Site Configuration > Identity , then Enable Identity .
Under “Registration Preferences”, you may then select “Invite Only”. Personally, we found GitHub to be the best way to keep things in one place, therefore we recommend using GitHub as your external OAuth provider. Please select “Use Default Configuration”.
Afterwards, it’s necessary to go to the “Service”, section, and enable “Git Gateway”. Without this, you will not be able to push changes to your repo, and Decap will fail to load your content.
Finally, you may invite users under Identity > Users . Here, you can invite yourself using the email attached to your GitHub account. You may, of course, add other users if desired.
Finishing Touches#
If everything went well, you can now go to your-website.com/admin to access Decap CMS, and sign in through GitHub! You can also change your domain to a custom one on Netlify. Feel free to reach out to [email protected], or [email protected], for any additional assistance or troubleshooting.