This article outline was organized by Sheng, with content filled by ChatGPT. Yes, you guessed it! Even the image was generated by ChatGPT.
Let’s be honest, most tech tutorials these days read like cooking recipes — step by step, no room for creativity! So instead of holding your hand through every little thing, I’ll just drop some key links here, and the rest is up to you. May the tech gods be in your favor!
1. Install Hugo - Easy as making instant noodles
This part is ridiculously easy. Just follow the instructions on the Hugo site like you’re making instant noodles, and voilà, you’ve got Hugo installed.
Installation | Hugo (gohugo.io)
2. Create Your Website - It’s like playing with LEGOs, but the blocks move on their own
Once Hugo is installed, follow the instructions to quickly build your website. It’s kind of like building with LEGOs, except these blocks move, grow, and transform on their own. It’s wild!
Quick start | Hugo (gohugo.io)
3. Choose a Theme - Pick wisely, or you might end up living in a haunted house
Choosing a theme is like finding your dream home. Choose wisely, or your website might end up looking like a haunted house that no one wants to visit. I personally went with the Hugotex theme, with a few tweaks of my own.
Complete List | Hugo Themes (gohugo.io)
4. Deploy to GitHub Pages - Become the real estate mogul of the internet
After building your website, it’s time to show it off to the world! Deploying to GitHub Pages is like turning yourself into a real estate tycoon of the web, putting your masterpiece on display for everyone to see.
Pro tip: Look into using GitHub Actions for auto-deployment. Once you’ve written your post, just merge it to main
, and boom! It’s live.
Deploying Hugo on GitHub Pages
Now let’s dive into a few key commands and features that’ll make your Hugo journey a breeze (or at least less of a hurricane).
Important Hugo Commands and Tricks
-
Create a new post: Need a new blog post? Easy peasy, just type:
hugo new post/your-awesome-title.md
-
Create your custom post template: Want to save time on formatting every new post? Create a custom archetype in the
archetypes/
directory. Something like this will do:--- title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} draft: true author: "Sheng" description: "" tags: [] keywords: [] ---
-
Use your custom template to create a new post: Now that you’ve got your fancy template, you can use this command to create a new post based on it:
hugo new --kind ../posts post/test.md
And there you have it! These are the essential tricks that’ll make working with Hugo feel less like a chore and more like you’re bending the internet to your will. Happy building!