Lyrenhex Blog

New blog, who dis?

2 June 2022   20 December 2022 6 minute read site updates, tech

I finally have a blog again for longer-form content! So first, let's talk a bit of history and technical details.

Well, hello there General Kenobi! It’s been a while since I’ve had a blog, and I’ve certainly never had one that I’ve spent quite so long setting up, so this is a neat experience. Don’t get me wrong: I’ve had a couple of blogs before – usually built with Wordpress[1] (though there was that one time I started building a full blogging engine in PHP and MySQL, but thankfully I didn’t go very far in that process…).

So, this is my first fancy custom-themed and architecturally different blog: full stylistic control, no databases, and simple text files for everything. That’s neat!

But why?

I’ve always liked the idea of blogging, but platforms like Wordpress – which are very hand-holdy and easy to get something working but then damned impenetrable to quickly customise – always stymied that creativity. Web design is a hobby for me, not a career or something I want to spend weeks working on for a result; I want to make a change and see it appear in front of me rapidly, without messing around with a thousand configuration files and CSS rules that I don’t have an architectural understanding of (hence why most of my CSS ends up being hand-rolled).

Plus, I’m easily inspired by cool things - notably, fasterthanlime’s blog is always a fun read, and seeing more and more[2] cool tech blogs? Hell yeah. Why not one more, aye?[3]

Let’s talk tech…

As I said earlier, this is one of the most architecturally different blogs I’ve started: there’s no databases. To the contrary, it’s built using a static site generator (SSG) called Zola.

Using an SSG has multiple advantages, all of which you can find out about at your local SSG dealership, but in practice for me it simply means I can cut down on hosting costs significantly thanks to GitHub Pages (and, of course, not needing to host a goddamn database too).

There’s not much rationale behind my choosing Zola over something like Hugo - they both, to my knowledge, function roughly the same and are both great choices.

An honorary mention of Hakyll

I would be remiss not to mention the most unique SSG I looked at though: Hakyll. The concept has its own specific elegance: it’s a Haskell library which you use to build your own SSG executable unique to your site’s design and layout, which is then in turn used to generate the site itself - the novelty and lower-level nature of such an approach was certainly appealing, and I did consider Hakyll for a while, hence its shout out here.

Ultimately, however, I’m not an overly big fan of Haskell[4] unlike my university lecturers, and I wasn’t particularly keen on dealing with the headache that is cabal and stack. Special mention for Lee Meichin, whose blog introduced me to Hakyll in the first place!

Setting up the blog

Setting up the blog had a very short learning curve, with Zola being fairly well-documented (even if said documentation does fall down when you need to use functions like get_section - though I’ll grant that those are provided by the template engine and not Zola itself, to be fair): content is written primarily in Markdown, with boilerplate and markup of that markdown (ahah) handled via templates - really just HTML files with some variables thrown in.

A little bit of template magic, like the following to (at the moment) generate my list of blog posts:

{% for page in section.pages %}
<div class="subsection">
    <h3>{{ page.title }}</h3>
    <p class="meta"><span>{{ page.date }}</span><span>{{ page.reading_time }} minute read</span></p>
    {% if page.description %}
    <p>{{ page.description }}</p>
    {% endif %}
    <a class="btn" href="{{ page.permalink | safe }}">Read more</a>
</div>
{% endfor %}

… and some sufficient level of abstraction and then you’re done!

I opted to merge my previous iteration of lyrenhex.com into the blog too, so that my previously static-from-first-principles website is now the generated static homepage to my generated static blog. Whew.

Ultimately, that results in a neat experience, in my humble opinion: all my creative non-professional[5] stuff is all in one site. Nice!

So, what next?

I think I mentioned this earlier, but it’s worth repeating: I’m new to this writing-about-tech business. I’ll get better as I go, hopefully, but that’s “to-do”, so to speak.

Other than simply getting better at writing (please do give feedback if you’ve got anything useful - I’d love to hear it; my socials are at the top of this page, in fact), there’s definitely some rough edges in the site at the moment that I’ll get round to as I go. There’s no “roadmap”, per se, but I know that some other blogs have section links and the like, so I’m imagining adding such features would be ideal… plus, you know, tags might be nice.

But all of that’s to come - I’m going for as basic a launch as possible at the moment, and the complexity will come later. As is always the case with hobbies…

And finally: my style choices

For anyone who’s curious, here’s the font setup and themes I’m using at the time of this post:

  • Headers are Quicksand.
  • Body text is Crimson Pro.
  • Code is Cascadia Code, with ligatures, themed using the ayu-light theme from Zola.

And with that, I think that’s everything?

Have a great however-long-till-the-next-post,

  • Max.

Footnotes

Oh boy, I do love me some footnotes: this is your warning that I’m liable to over​use[6] them when writing in a blogging format.

I don’t think Wordpress had footnotes, did it?


  1. Good old stock themes, to boot!

  2. This is a particularly interesting article I read recently there – I highly recommend it! Plus, y’know, it did lead to an improvement in the Rust compiler, so that’s always neat.

  3. Fair warning: I’m not them, and I’ve never maintained a blog (or a social media presence, for that matter) consistently for too long. Expect infrequent blog posts, of probably not quite so good quality because - well - I’m new to this.

  4. Perhaps I’ll discuss this in a later post…

  5. In case there’s any doubt, this is not a professional endeavour - at all. Those details live elsewhere.

  6. Fun fact: that gag required a zero-width space to get Zola to render it how I wanted. I could have used HTML directly, but where’s the fun in that?