thomas.touhey.uk

Welcome, thblog!

After five years wanting to refactor my blog's internals, and a few rushes along the years to achieve this, I finally did it, and pimped the blog's design so you can feel the change (two times rather than once!), dear readers.

A bit of history

The story begins at the end of 2016. At the time, I had already made a few web projects in the last two to three years, mostly in PHP. These projects are partially archived by the Wayback Machine, going from the oldest version of touhey.fr, archived in Aug. 2014 to other websites with my Minecraft player name from back then. I had also made the switch to Linux on my main PC just the year before, right before being a student at 42, and I was discovering static websites, making me want to make mine.

So I did the most basic generator possible, as a bash script using pandoc, which listed all posts, made a page per post, and a simple index with a header where I presented myself, all of it in HTML4 without CSS, inspired as I was by motherfuckingwebsite.com. Thus, my blog was born, with already a first post, fopencookie - make your own file streams!.

This period was short-lived; so much so that no archive of the site was done by the Wayback Machine, on which my website goes from an assembly-like presentation from May 2016 to the next version, in 2017. That's explained by the fact I quickly felt limited by both bash which wasn't a good pick for the task, as well as having to implement every modification I wanted in that language.

After some research, I decided to switch to Jekyll, a website generator with all of the features one would expect, such as managing blog posts, theming, plugins, and so on. I used an existing theme, Researcher, then modified it to match my style better, wrote a few more posts, added a basic multi-language system since I wanted to write content in both French and English, and voilĂ , I found myself with a new website!

For 8 years, I've therefore used a static website generator written in Ruby with an extension system in that same language. During that time, I've made a few changes:

Note that the multi-language system has evolved between 2017 / 2018 and 2024. Sometime during this period, I've acquired the second-level domain touhey.uk, and therefore decided to migrate my English blog on thomas.touhey.uk, leading to the separation of the project into two separate directories with elements such as the theme repeating between both, so modifications on it had to be done on both versions.

Also, even though I tried to build a navigation system suggesting versions of each page in other languages, the system was misbehaving when the translation did not exist (e.g. for untranslated blog posts).

In the end, I found myself with a big bag of hacks, which were a mess to maintain and evolve. Also, I made the choice not to learn Ruby, since I already knew Python on the side. Note however that my blog was the only static website project of mine that ended up with this complexity; my many other static websites using Jekyll were far simpler, e.g. touhey.pro.

At the same time, starting from 2020, I started learning and liking writing documentation on some projects with Sphinx and reStructuredText, such as thcolor, thox, or later on, Cahute. The syntax, even though it initially constituted a barrier to entry since I was used to Markdown, ended up appealing to me. A post I read at the time really resonated with me; it highlighted that most flavours of Markdown were incompatible between them, as opposed to reStructuredText which was clearly defined and designed to be extensible using custom directives and roles. This argument resonated even more since on my blog, to inject some basic elements, or even code, I had to add Liquid or HTML directly into my Markdown file, and even though it worked, it felt icky to me.

Around 2021, I ended up being fed up with my system, and started various experiments to get out of my bag of hacks and use reStructuredText on my blog. These experiments resulted in the tool I use today: thblog.

First thoughts and experiments

Starting from 2021, seeing what I had, I gradually defined a wishlist, which included the following elements:

At the time, I had started exploring tools similar to Jekyll in Python, such as Pelican and yozuch, but they didn't seem appealing to me. I also thought about using Sphinx directly, but it didn't seem very appropriate to use with my blog. So in the end, I've decided to make my own tool in Python, which I've named thblog.

Before writing the tool, I started writing my blog's content as if the tool existed, imagining how it would work. I translated all of the blog, even the drafts, in reStructuredText, and organized these elements in the way I wanted them to be organized in the final version; the result appealed to me, so I started taking concrete steps towards a blog in reStructuredText.

The specifications for the tool were the following:

Note however that I didn't want to support theming at first: since I'm making a tool tailored to my needs, there's only one theme, the one I'm making for my blog.

Also note these specifications are only for the initial version. A lot of features can be added from there, including:

thblog: the tool that brings it all together

The technological stack I chose for the tool is the following:

The first theme under thblog, which ended up being used all through 2024, is still available on the Wayback machine; the current one, made in March 2025, is inspired from Lagrange, a browser for Gemini, with the Atkinson Hyperlegible Next fonts by the Braille Institute.

As was already the case while the blog was running on Jekyll, neither the tool nor the source content are open source, even though the exports are mostly under CC BY-SA 4.0, and even though I version the code and content using git in a private repository on Gitlab.com. On this, I agree with Josh Comeau on most of the reasons he describes in Why My Blog Is Closed-Source (not on the security aspect, though):

That being said, the tool's development is still an experience I'd like to share, possibly in other posts; even though I don't want to give the fish away, I find it useful and satisfying to share a bit of the fishing rod that helped me fish it.

What does that mean for the blog's future?

This blog keeps on being something I work on on my free time, without any constraint and when I want to work on my writing skills. This technological transition, even if it does not directly change the result, allows me to achieve more satisfaction in writing for the blog; I don't rule out writing more posts than in the last seven years.

However, during the years, I've grown a significant amount of ideas for subjects I'd like to write on in posts for this blog. Among the 15-ish drafts I've got, one can find among the longest:

Overall, I read and investigate on a lot of subjects in the context of both my personal and professional projects, my courses, and my discussions away from keyboards and various social networks. I recommend subscribing to the blog's RSS feed; there is one by available language, and I try to translate posts after the original language I've written them in.

See you in my next posts!