tl;dr rage against web frameworks
It’s no secret that my skills as far as web development is concerned are pretty much nonexistent, but at the same time, having a personal website or project websites is pretty useful. Previously, I had a hand-coded site which consequently had only two or three pages in it. I thought there should be a better way. I didn’t want to use a full-on web framework like django or catalyst just to create simple sites; there was no need for that. I just wanted to write a few simple pages, have it work and have a consistent site without dealing with the overhead of a framework.
Some of my personal requirements were (are):
has to be posix-compliant, because I routinely use OpenBSD, debian linux, ubuntu linux, RHEL, and OS X. all of those are POSIX operating systems, so I should have a system that works across the board.
dependency-light, because I don’t want to have to worry about which packages I have installed on which box for which interpreter.
generate correct and lynx-friendly pages, because I like things to be written properly and lynx is my default browser in many cases (pretty much any time I use surfraw).
sites should be customisable with templates and which markdown editor they use.
it should automate the tedium out of designing sites, letting me concentrate on content.
I found the suckless web framework and it worked for generating several sites, but didn’t work so well on openbsd and it choked on my large site. I decided to take the principle of sw and apply it to my own framework. I spent a few days coding up something in /bin/sh that uses sed, echo, and grep and only the posix-defined options (i.e. \c in echo instead of -n) to maximise portability.
The code works and it works pretty well - I’ve got it generating the following sites:
the rawk homepage - currently generated in OS X
my personal homepage - currently generated in debian
coder.kyleisom.net - currently generated in debian
my devio.us homepage - currently generated in OpenBSD
if you need to generate sites and don’t need dynamic content, you might check out rawk.
February 02, 2011, 4:51pm
