Ink
Ink, BenCrowder.net, Blogging
As of a few minutes ago, this site is now running on Ink, the static blog engine I’ve talked about for the last couple weeks. Every page is straight HTML/CSS. There’s a little bit of Javascript, too (for submitting comments, displaying pedigrees, and pulling in the Flickr feeds on the art page). No PHP.
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
/pages and /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 /web.
I can test everything locally, and when I want to push it live, I just type ink deploy. (I’m using rsync.)
Migration
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.
Going forward
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.





