Blog


How I Made My Blog


Long story short, I made it using Hugo!

Backstory

I’ve been wanting a creative outlet where I can share more details about my projects, and a blog seemed like a natural outlet. I spent a lot of time looking at what others were doing. Which led me to believe that I needed a React framework. Taking a look at all the branches my site has, you’ll find a plethora of failures…

Later, learning about static site generators ignited my hope of a simple and fast way of creating content. I didn’t want to abandon my simple HTML, CSS and JS to load my main page. A simple web search and a “Hugo in 100 seconds” masterclass convinced me I had found just the right thing!

Unconventional use of Hugo

While keeping my landing page just as is, the goal was to get Hugo to compile to a /blog directory. I created a “hugo_src/” directory where the Hugo source code will live. I had Hugo compile to a “../blog” directory that can be hosted normally as my site is. This was achieved by editing the hugo.toml:

1baseURL = 'https://v01d.dev/blog'
2languageCode = 'en-us'
3title = 'Blog'
4publishDir = "../blog"
5
6[[menus.main]]
7name = 'Blog'
8pageRef = '/blog'
9weight = 10

The key is defining the “publishDir” to “../blog”. I kept the rest of the site simple, with only the /blog page that includes the list of content.

Theming

As you can probably tell, I didn’t use a theme provided by Hugo. Based on a black theme created by Hugo. I copied and manually edited the partials and defaults from the basic template into my hugo_src.

I simply edited the main.css to style everything 👌.

Conclusion

While I’m sure this isn’t the best way to create the most optimized blog. This was an amazing way to get exactly what I wanted in a few hours of work over the weekend.

Of course, the source code to my website can be found on my GitHub