From Jekyll to Zola
Motivation
The blog has been migrated from Jekyll to Zola for fun and profit.
- Setting up Jekyll was surprisingly fiddly on Windows - I had to install ruby & msys, then troubleshoot live reloading. On the other hand, Zola is a single executable that just works
- My next job is going to involve a lot of Rust - I thought I'd get used to things like TOML!
- It's something new and hence - wonderful††There is a book by Soviet-era poet Daniil Kharms titled 'Я думал о том, как прекрасно всё первое!' - 'I thought about how wonderful is everything [first/new]!'
Migration
After creating a brand new site with zola init myblog
, I have added Slim theme as a git submodule, copied over my posts, converted variables from YAML to TOML and... that's mostly it.
Automatic deployment
I make use of Github Actions just like in the docs, except that checkout needs submodules: true
due to how the theme is added as a git submodule.
Blog structure
Grouping posts by year and making each year section transparent so that everything is aggregated in the parent blog
section is super neat! The only problem I had was with javascript playthings page. To make it not appear in the list of regular posts, I had to add sort_by = "date"
to the root _index.md
, then delete the date field from the javascript index.md
. Oh, well!
Marginal notes
Lifted pretty much verbatim from here. I love them!
Theme tweaks
- Mobile-friendly list of posts - I have discovered it doesn't look so good with long titles/many tags by default
- Modified template for post header to allow
null
date in pages - Removed circles under emphasized text
The second one was the most cumbersome, as I had to modify a macro that is responsible for post headers. It was done in 2 steps:
- First, create
templates/custom_macros.html
with a modified version ofpost_header
macro fromthemes/slim/templates/macros.html
- Second, create
templates/page.html
that extendsthemes/slim/templates/page.html
, to importcustom_macros.html
and use its version of thepost_header
inside{% block content %}
The rest was just copying slim.css
from themes/slim/sass/
to sass/
and changing what I needed.
What's next?
I have been toying with an idea of adding a comment section. Something suitable for a static website while being less intrusive than Disqus. Perhaps Isso? Seems like fiddling with a blog is at least as fun as writing it.