Mar 30, 2026
--:--:--
🌫️
29.4°C
Breaking News
Loading breaking news...

Creating a Blog with Hugo: Easy Steps for Beginners

M

Mershal Editorial Team

Staff Writer

3 min read
Creating a Blog with Hugo: Easy Steps for Beginners

Learn how to create a static site with Hugo in simple, actionable steps. Perfect for beginners!

So you want to create a blog with Hugo, huh? 🎉 I’ve been meaning to write about this for a while because, TBH, I struggled with it for months before I finally got it right. If you’re like me, you’ve probably wondered why everyone raves about Hugo and how it makes blogging so much easier. Spoiler: it took me 3 hours to debug what was a typo! 🤦‍♂️

When I first tried using Hugo, I made this stupid mistake of not reading the docs properly (classic). Honestly, it took me weeks to figure out how to get my theme to display correctly. Here’s what actually worked for me after tons of trial and error. So let’s dive in!

Getting Started with Hugo

First things first, install Hugo. You can follow the official installation guide here, but I'll give you a quick rundown:

brew install hugo

For all you Windows folks out there, I hear Chocolatey is your best friend. 😄

Creating a New Site

Once Hugo is installed, creating a new site is super straightforward. Open your terminal and run:

hugo new site my-awesome-blog

Now, navigate into your newly created directory:

cd my-awesome-blog

Pro tip from someone who's been there: Don’t forget to initialize a Git repository if you're planning to deploy this later. Trust me, future you will thank present you!

Selecting a Theme

Alright, here comes the fun part—choosing a theme. Hugo has tons of beautiful themes over at Hugo Themes. Whether you want something minimal or super flashy, there’s something for everyone. Once you find one you like, here’s how to install it:


git init
git submodule add https://github.com/the/path/to/your/selected-theme themes/selected-theme

This snippet saved my project, hope it helps you too!

Creating Your First Post

Now that your site’s looking snazzy with a theme, it’s time to create some content. To create a new post, run:

hugo new posts/my-first-post.md

Pop open your favorite text editor and start writing. Remember, Hugo uses Markdown, so it’s super simple. But here’s what I found out the hard way: don’t forget to check your front matter. Here’s a template you can use:

+++
title = "My First Post"
date = "2026-03-23"
draft = false
+++

If you want more tips on writing in Markdown, btw, I wrote about Mastering Markdown last week—check it out!

Building and Running Your Site

And here’s the moment you've been waiting for. Build your site by running:

hugo server

Your site will be live at localhost:1313, ready for you to admire!

Deploying Your Blog

Let’s get this baby live. I usually go with Netlify for my deployments—simple, fast, and free tier available. But, Github Pages or Vercel are great too. Here’s a quick guide on deploying with Netlify:

  1. Create a new repo on GitHub and push your site
  2. Sign up for Netlify and connect your repo
  3. Set the build command to hugo and the publish directory to public

And bam, you’re live. 🎉

Troubleshooting Common Issues

One more thing before I forget—if you’re running into issues, check your Hugo version compatibility with the theme. Also, make sure your paths are correctly set.

If you're stuck, drop a comment below or hit me up on Twitter—I love helping out fellow devs. 😊

And that’s a wrap! Try this out and let me know how it goes. If you enjoyed this, you might like my post on Creating Dynamic Websites. I'll update this post if I find something better. Happy coding! 👨‍💻

Share This Article

Related Articles