On Setting Up a Blog (Part 1)

May 31, 2021 | 4:41 pm


Alright, so this was a process and a half.

So this all started because I met a new friend who is rad as hell and inspired me to finally work on these ideas and projects I’ve had for a while now but never bothered to actually do.

So, this will finally be the first one I’m doing. Setting up this blog and finally writing down all these thoughts. So the process of this was… a bit of a process.

I knew I wanted to host it on Github Pages at the start. I lose focus on projects easily, and didn’t want to bother with buying hosting or self-hosting something like this if it doesn’t pan out long-term. So testing it out with Github Pages will at least help me understand what this site might be like long term.

So that requirement meant that a static site generator was needed in order to make sure that the site is compatible with Github. So as always I do the first step in any kind of research like this. Check Reddit.

I know, Reddit is pure 🤮. But despite how shit it is as a community for creating actual conversation and discourse, it is great for crowd sourcing knowledge and being the first step to figure out what your best options were.

With that said, I skipped the research part. I’m running on 4 hours of sleep today, so don’t blame me for going with the first option that fell in my lap. 😅 So I went with Hugo, a static site generator written in Go. Apparently speedy, secure, and modular; I went with it because the tutorial made it look easy to just write stuff in markdown and generate a site.

So, ultimately, this article is going to process the series of roadblocks that came about as I tried to create this blog using Hugo. Before this I had minimal experience with a static site generator. And of course according to my nature, I couldn’t use anything out of the box, instead I needed to tweak things and get it to the point you see here.

So the first roadblock was installation. The actual installation was perfectly okay, but I used apt install hugo and that went swimmingly; and after I browsed some themes I came across a hurdle. Current theme does not support Hugo version 0.40.1. Minimum version required is 0.73.0… 😑

Probably should have listened when the install guide said “please don’t install from apt, it’s very out of date.”

Alright, simple enough solution. Download the .deb and install that way. Done.

So the proper version is installed; and the theme is compatible! Next step! To generate a simple site! And the result… Well it looks boring, (look at an example of the default theme to see what I mean!)[https://janraasch.github.io/hugo-bearblog/] It’s a classy black and white, it clearly screams “I am fast and minimal and adult!” But I’m a girl, I’m not classy! I’m pretty and I want my shit to look pretty too!!! 😤

Thankfully I have a bit of experience messing with HTML and CSS, so it was easy enough to find the file that contained the style tag and change it to a nice set of colours! And thankfully Hugo’s can run as a server, which let me make and observe inspect changes on the fly and figure out what works almost instantaneously.

Also a nice feature of this theme is that it includes a dark mode based on your OS. So that was nice to have a nice bright and sunny theme during the day; and base the dark theme on Nord to have a cool and sexy look at night! 😋

So the most difficult part of customizing the theme was adding links to blog posts in the front page. So, before we go forwards, gonna remind y’all that I’m running on 4 hours of sleep while doing this. So processing the intricacies of documentation and the implementation of Hugo was beyond my ability to focus and process information.

So instead I did what I do best; look for other people having similar problems and copy the solutions other folks give them on StackOverflow/Reddit/etc.

So to avoid going into the boring specific details. The way that Hugo generates stuff on the fly is cool and it’s easy enough to work with. But this was a case of, the examples you see work well for creating lists of the highest level pages; but to compile pages within a subdirectory requires some logic that you need to dig to find. Ended up having to give attributes to pages, and using logic to specify those specific pages.

That was kinda frustrating, but didn’t take that long.

So, the biggest difficulty overall was getting Github Pages set up. Which I’ll get into in part 2…