Janky Jekyll in Swift
It’s been at least 16 years since blogging went “legit, sort of” so I’m a little late to the party. Since 2002 one of my hobbies has been setting up my own blogging systems and then ignoring them (see also gym membership). Jekyll and GitHub pages made a lot of sense to me but the minimal setup and markdown file posting was too easy and my addiction to setting up my own blogging infrastructure made that obvious approach a non-starter for me!
Swift and Vapor
More recently, I’ve been experimenting with server-side Swift using the Vapor framework and Heroku for hosting. I wanted to rebuild this site with those technologies but wrap them in something that works a lot like the Jekyll framework that (I think) I enjoy using. This has taken the form of https://github.com/boundsj/site that currently hosts the implementation of Rebounds.net.
So far, this implementation is an experimental and basic Vapor generated website. On top of that, I’ve bolted on a few things that make it work sort of like a poor performing and feature incomplete Jekyll framework, such as:
- A few simple routes for navigating to the index of the site and individual posts.
- A boot loading script that loads into memory the content of all of the post files that are committed to the site repo.
- Along with the boot script, logic to parse out and organize any front matter included at the top of the markdown post files.
I’ve enjoyed building this simple, bespoke, Jekyll-like system in Swift and can see now how I can spend even more time on it. For example, I think it might be interesting to implement my own CommonMark parser in Swift (see Swift Talk’ CommonMark videos) and extract the entire Jekyll style markdown parsing bits into a Swift package for sharing. However, what I most want to do is actually post more frequently!