In Baked not Friend I mentioned that I was starting to rebuild this site using rake. The last think I want to do is create another "blog" system, but after evaluation and using several I decided that building my own software will probably be best. This site is part tech blog, part project log; I use anotherjesse.livejournal.com for my personal blog as it allows posts to be marked friends/family only.
Thanks to rake (ruby's make on steroids) and ERB, in a couple hundred lines I'm able to:
- Wrap all content in a consistent layout
- Incremental builds of what has changed
- Store posts in yml format (easy to edit, easy to view in web browser)
- A simple comment system (ruby cgi) that emails me comments, allowing me to click a secret url to accept, another secret url to reject (the comment is saved as a yml in a special directory, so using a classifier or more advanced anti-spamming mechanisms should be easy.)
- Dependancy based builds of special pages like the article directory
- Tidy results against all my html files after each build (current tidy output)
- A feed of the latest posts (although I use lighttpd redirects to use feedburner)
I keep all my content (posts, projects and more) in a data directory that is kept in SVN. Then I have a checkout on my server and my laptop, allowing me to have a version of my site "running" on my laptop.
I would have liked to use why's hobix and it seems that rake is a good fit for it. Hobix did most of the things I wanted but was more complicated than I needed and was not as flexible as a generic rake build script. (The idea of storing content in yaml came from hobix.) Oh, and I'm calling it "garden" (garden rake, get it?)
Rake has been a great tool for building this site, and I'm looking forward to experimenting with it more. (While for my site living on the filesytem in svn is great, I'm playing with using ActiveRecord to create dependancies (using the objects updated_at timestamp instead of mtime on a file) to rebuild pages.)
