Category: Programming

The Python logo with it's yellow and blue snake, with some Python code on the right

Joining Strings in Python: A "Huh" Moment

I just love it when random conversations on Mastodon result in a “Huh, I didn’t know that”-moment. The other day I had one such moment about the Python programming language. I’ve been writing Python code for the last 17 years, and quite a lot of it the last 7 years since it is now more or less my full time job. While I still learn things all the time about the language, I’ve started to get more curious about its quirks and surprises.
The cartoon Mastodon mascot on the left, with the hugo logo on the right.

Threaded Mastodon Comments

Already before I set up this website using Hugo, I wanted to integrate Mastodon comments into the posts. I had already come across this implementation by Carl Schwan before, and it seems to work really well. Integrating it was fairly straightforward, and is already explained in his post. I modified it a bit to remove the dialog box and include the core of those instructions in the comment section preamble. Aside from that, I was happy with the original setup as a starting point.
A shelf of old folders full of files.

Add Archives to Hugo

One thing that I felt was missing from Hugo, now that I’ve converted my site from WordPress, is the yearly archive feature. I mean, it’s essential! I have a whole 1, one, post from 2019, so I clearly need that. Ok, so maybe not. But, it is nice to have in place for later nontheless. Searching online led me to this discussions thread on the Hugo forum. There is no such feature it seems.
The Hugo logo centred on a blue background.

Playing With Hugo

I got really tired of my WordPress website, so I decided it was time to rebuild the whole thing. Again. I have basically been using it as a static site. In part because I really don’t like using the Gutenberg editor that comes with WordPress. I have tried static site generators before. In particular Jekyll, which I used for some project sites in my previous job. I have also used Sphinx a great deal for writing documentation.