Create Your Static Site with Hugo

Create Your Static Site with Hugo

There’s many different options when it comes to generating a static site, Jekyll, Hexo, Gatsbyjs, MkDocs, Wyam, and many more. So why did I choose to create this blog with Hugo?

No reason. I just did. All of these options are viable for creating something like a blog, but I do suggest if your use case is more complicate and you have some experience with React, then do check out Gatsbyjs.

Let’s Get Started

First off, you’re going to need to have Git and hugo installed. If you haven’t used Chocolatey, this is so easy to install hugo. Simply open a PowerShell console and run this command.

choco install hugo -confirm

Now that’s hugo is installed, you can create your new site

hugo new site myHugoSite

Make it pretty

If you’re like me .css is not a strong suit. But behold this magic: Head on over to themes.gohugo.io and pull the git repo on whatever theme you like best into your themes folder in your project:

cd myHugoSite

git init;

git submodule add https://github.com/Vimux/mainroad

Now open your config.toml configuration file and set the theme to mainroad.

theme = "mainroad"

Write it up

Create a new markdown file and write away.

hugo new posts/firstPost.md

Take a gander

You can start a development server to see what your content looks like:

hugo server

Commit your site to GitHub

When you’re ready commit your source code to your GitHub repository.

Deploy to Netlify

netlify

Sign up on Netlify with your GitHub account. You can hookup your Git repo to Netlify and literally deploy your site just by committing your source code.

Did I mention that all of this is free?

Dennis Eugene Stepp, Jr. avatar
About Dennis Eugene Stepp, Jr.
I am a software developer in Knoxville, TN. I'm also a game/web developer with Unibear Studio, and stage manager/web developer with the Earl Park Fall Festival Foundation. My interests include: process and workflow optimization, automation, JAMstack technologies, software architecture, object oriented languages, and game development. I also collect retro PC/console video games, dabble in gardening and woodworking. I have a passion for craft beer, especially while playing recreational ice hockey.