How it works (in a nutshell)
I’ll write more about all this later, but here’s the directory layout:
/pages /posts /scripts /templates /web
/posts are home to a bunch of Markdown files. A Python script (
ink) lets me bake those into the templates and puts the resulting HTML files in
I can test everything locally, and when I want to push it live, I just type
ink deploy. (I’m using rsync.)
Migrating the blog over from WordPress wasn’t too hard. I wrote a short Python script to pull my posts out and put them in Markdown files (I’ve been using Markdown on my WordPress blog for a while now), along with YAML metadata like the categories and stuff. With more Python magic I got all the links cleaned up (I wanted relative URLs instead of absolute) and deleted 160 megs of unused images (WordPress uploads four copies of every image, at different sizes) and fixed some broken links. And there had been a weird encoding bug that crept in a while ago when I merged all my old blogs into WordPress, turning all the curly quotes and em-dashes into gibberish, so I fixed that.
Whew. I feel liberated.
I’ll spend the next few days using Ink for real and cleaning up the code so it’s publishable, and then it’ll go on Github as usual.