I’ve had this idea of starting a blog a long time ago. However, due to my own laziness and inability to choose a hosting solution, it didn’t happen until this week. It is a long overdue project at this point but hey, better late than never.
It’s been a while since I have actually written something,
I lost the ability to write I will keep the focus of the first post to the rationale behind the technologies I chose to build this site.
When it comes to blogging, the first thing to consider is platform. Based on my non-scientific taxonomy, here is the range of choices:
- WordPress, either hosted or self-hosted. I could go this route by having a dedicated VPS running the website. It’s probably the easiest option among self-hosted anything thanks to “one-click” setups available on major cloud providers. But everyone nowadays says WordPress is too bloated, and I tend to agree. An honourable mention is a new-ish platform called Ghost, which has a similar concept to WordPress.
- WriteFreely, a free and open source blogging platform which can be self-hosted or hosted by write.as. It’s' lean, elegant and privacy-driven. However, I feel it a bit lacking in terms of feature (i.e., it doesn’t support comment). Also, the hosted version is a bit too much for me at $6 USD per month.
- Various commercial blogging platform (Blogger, Medium, etc.). Been there, done that, not gonna bother.
The bottom line is that I want finer-grained control over what WriteFreely can offer but not necessarily the bloatness and admin overhead WordPress brings. Moreover, I don’t want to pay a ridiculous amount of money every month just to keep the website running. Not because I don’t want to support FOSS (in fact I really do), simply because I’m too poor. More on this a later day.
Finally, I settled on one of the static site generators called Hugo and GitLab Pages as the hosting solution. Written in Go, Hugo is supposed to be faster than its peers (such as Jekyll). Other than that, I don’t have too many opinions myself, they are all very similar to use.
Aesthetics and Functionalities
To my own surprise, I didn’t spend half a day picking themes. I grabbed PaperMod from theme store simply because it’s simple yet functional. It can automatically switch between light and dark mode depending on browser/system setting; it supports site-wide search; it has an easy-to-configure profile page with Social Media icons. I very much enjoyed tweaking it according to the documentation and didn’t feel it got in the way of accomplishing things.
Without changing much of the site’s
config.yml, I was able to:
- Add permalink to each post
- Add table of content in front of each post, folded by default
- Re-arrange the sequence of Archives/Categories/Tags/Search
- Add favicon (the emoji appearing on browser tab)
- RSS feed works out of the box like magic
For site analytics, since I don’t use Google myself, I don’t want to force Google on visitors by tracking them, either. In my research, Matomo is a popular alternative. It ensures privacy and can be self-hosted.
Interestingly enough, a small project called GoatCounter caught my attention just before I committed to Matomo. It’s FOSS and written in Go; it can be self-hosted and the hosted version is free for non-commercial use. Since I have very basic needs for analytics and my site’s traffic will almost certainly be light, the free tier fits me perfectly. I registered the service, added the code snippets on my site according to this blogpost and it’s done. Here is a look at the dashboard:
I have yet to figure out a way to implement a comment system to my blog. Hugo and PaperMod theme both support Disqus quite well. However, the free-as-in-beer service will bring ads and cross-site trackers, the least things I desire. The following options are promising:
I was able to configure the services on my VPS but somehow got stuck at configuring nginx. Don’t want to follow some random guide to hack things together not knowing why, I’d rather spend the time to systematically study reverse proxy in preparation for Linux Foundation Certified System Administration. Of course, more on this in a later post.
Hopefully the day I become more comfortable with reverse proxy is the day I try one of these comment systems out. Till then, I’m pretty happy with what I’ve got so far.