So you've been meaning to set up a blog but overwhelmed by the options? Bro, I've been there too. After months of trying to get my head around dynamic vs. static sites, I finally landed on Hugo, and let me tell you, it was a game changer. ๐
Why Hugo?
When I first tried setting up my blog with Hugo, I made this stupid mistake of not reading the official docs carefully. Spoiler: it took me 3 hours to debug what was a typo. But once I figured it out, I couldn't believe how fast and efficient it was. It's like giving your website rocket boots. ๐ฅพ๐ฅ
Getting Started
First things first, you'll need to have Go installed, since Hugo is built with it. I still remember the frustration of trying to brew install it on a sluggish internet connection. But, patience pays off. Once you've got Go, install Hugo with:
brew install hugoIf you're on Windows, use Chocolatey or scoop:
choco install hugo -confirmCreate Your Site
Now for the fun part! Create a new site:
hugo new site my-blogThis sets up the directory structure for you. Easy peasy. ๐
Pick a Theme
Pro tip from someone who's been there: pick a theme that suits your style. Honestly, I spent days because I was too picky. Download a theme and add it to your site:
git init
git submodule add themes/your-theme Don't make my mistakeโremember to update the config.toml:
theme = 'your-theme'Create Your First Post
This is where you get to let your creativity shine. To create a new post, use:
hugo new posts/first-post.mdAdd your content in markdown. I found markdown super intuitive once I got used to it. In fact, itโs way easier than trying to code HTML by hand. If you're stuck, check out my article on mastering markdown.
Server and Debugging
Btw, you can see your changes in action by starting a local server:
hugo server -DIf things don't look right, you'll often find the answer in the console. Trust me, this saved my project more times than I can count.
Deploying Your Blog
By now, youโve probably got a sweet-looking blog. Deploying it is easy, too. I use GitHub Pages, and it works like a charm:
git add .
git commit -m 'Initial commit'
git push origin masterFor full instructions, see my guide on deploying Hugo sites to GitHub Pages.
Troubleshooting
One more thing before I forget. If you run into issues, the Hugo community is fantastic. Search forums, ask questions. Don't be shyโit's how I learned most of what I know.
Conclusion
Creating a blog with Hugo was honestly one of the best decisions for my tech stack. It's fast, efficient, and super customizable. Try this out and let me know how it goes! Drop a comment if you get stuck anywhere; I'm here to help. ๐