Posted on 2012-03-30
This is a blog post.
And it's written to test my blog scripts. I'd call it a "system", but that makes it sound like I think publishing my blog is a complicated process. It's not.
Right now, I'm writing in plain text in vim. I got fed up with blog "platforms" that just got in the way of actual writing. Suddenly I had to change browser to approve a comment? I had to wrestle with the software to get it to format stuff sensibly? What the heck....
So I figured, what do you actually need for efficient blogging? I came up with this:
So how do I do this?
Now scroll to the bottom of this page and hit the 'view source' link.... A tiny bit of rst-magic and then plain text. If you are reading this on the blog front-page, the /index.rst file is actually auto-generated, using complex techniques to only show the last few blog posts. Techniques involving deep dark magic like a for-loop, ls -tr | head -n5 and the arcane cat-command. True sorcery.
Some files of interest:
You may notice that I'm using quite a lot of absolute URLs. This is to simplify reusing the text multiple places. Since this blog post is visible from post the index page and the posts/-page, it's easier to just use absolute URLs. Same goes for the top "menu", if you can call it that.
How long did I spend on this? So far I've spent about two hours on it. And I can now write a blog post without actually clawing my eyes out because some wysiwyg editor gets in my way. I wont have to worry about future-support either, because even if I DID want to go back to something fancy, I figure I can spend half an hour writing a script to convert the content to some import/export-friendly garbage.
The total code for this is so far 89 lines (excluding rsync).
I'll probably add a twitter-button soon-ish too. Can't be much work... So far, most of the work has really just been a mixture of deciding what I want and applying sufficient glue. I suppose I'll have to style this thing a bit too, though...
I figure I'll write this post as a sort of "0.5th" blog post, since I don't actually intend to abandon wordpress quite yet, but I figure there's nothing wrong venting here, and seeing what happens.