overstimulate

Comments about the garden

Wed, 16 Aug 2006 rake comments

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.)


Responses to "Comments about the garden"

  1. Wed, 16 Aug 2006 Robert Brook says:
    Um - fancy making that code visible? Just asking!
  2. Wed, 16 Aug 2006 Jesse Andrews says:
    Sure thing, I'm working with Britt on making it more generic (using a yaml config file) at the moment. I'll post again with a link to the code after it has be de-hardcoded to my domain/paths.
  3. Fri, 25 Aug 2006 Lloyd D Budd says:
    Your passion and expertise at exploring technologies continues to impress me!
  4. Tue, 21 Nov 2006 Chris Atwood says:
    I've been thinking about building a system like this for a while now and am looking forward to seeing the code when you get it ready.

Leave a response

My Card Add to your Address Book

Jesse Andrews
open source, web browsers, web services, web sites & folk dancing. contacts/sites

Keep Up To Date

Get updates via RSS or
get email when I blog

Previous Blog Posts