Wednesday, April 24, 2019
BLOG IS BACK BAYBAY YEAH
It's a classic blog cliche: "Sorry it's been so long since I posted!"
Well I have a halfway-decent excuse, my old blogging system Staceyapp got its knickers more than a little twisted by some kind of PHP upgrade. Since it seems to be defunct, my choices were:
- Dig into the Stacey PHP and fix what was wrong.
- Move to another content management system.
- Get real and move to Wordpress or Squarespace.
I took a brief look at the first option -- I'm not a big PHP person, so to me it wasn't even obvious what was broken, let alone how to fix it. So I gave up on that. Time to move to another CMS! But which one? A static site generator was appealing for a variety of reasons, not the least that a PHP upgrade was less likely to bork it. I've been happily writing Python so I looked a few of those (there seem to be at least 10!) and they all looked kind of...complicated.
My fundamental interest here was how to get my site back with a minimum of work, which led me to select choice 4: none of the above. At the very least, I would need to write a little sausage machine to convert my existing markup files into the necessary format for any other option. Considering this, I asked myself, "how hard could it be to write a simple site generator from scratch?"
Welp. Reader, it was not actually that hard but it did take a lot more work than I had expected. The fruits of my labors turned out to be about 800 lines of python, which is a lot, even though I used mako as the templating engine and python's native
markdown for markdown parsing. The world likely does NOT need another static site generator but if anyone is interested it is here on the githubs https://github.com/headrotor/blog-builder where I need to document it better -- if for no other reason than as a kindness to my future self.
Going through 13 years of blog posts has been a bit of a trip -- I removed some ephemera I posted that today would go on Twitter, as well as fixed some linkrot. Some old pictures are gone, linkrotted away on on tribe.com, then posterous.com, then blogger.com -- I thought I had backed them up. Oh well: let that be a lesson to always host yer own stuff.