Sandro Turriate

Coder, cook, explorer

Moving off Webby to Nanoc

After a long survey of Ruby's static website generators I've finally settled on Nanoc.

Yay! A year and a half later later and I'm finally writing my second article. That's exciting even though moving to Nanoc wasn't. I put my site on webby over a year ago because that's what everyone else was doing. Unfortunately, I never felt like I fully understood webby which become yet another excuse not to write. It took researching a long list of static website generators and actually testing a few out to finally feel like I understood webby. If I didn't fight as hard as I did to make Nanoc work for me, I'd probably still be using webby.

Here's the list of generators I investigated:

  • Jekyll - haml unsupported
  • StaticMatic - can't write articles in Markdown
  • toto - haml unsupported, rack required
  • bonsai - tilt is extremely appealing, can't load custom helpers, no generic partial helper
  • middleman - really cool helpers/extensions, no method for retrieving a list of articles
  • webgen - worth a second look

Ideally I want to write all of my content in Markdown but have the freedom to easily change page layouts in an ad-hoc fashion. Autocompilation is a must. All html and css will be written in haml and sass. I should have the ability to write custom Ruby helpers. Partials should be supported. Feed generation and sitemaps would be great.


I love Bonsai's idea of "Magic Variables," which represent subdirectories within the current directory. Bonsai is hierarchy-friendly providing many methods for traversing up and down the tree, encouraging subdividing your application, which I like. What I don't like is having all of my content live inside of yaml file nor do I like manually maintaining a clean-url folder structure, i.e. 2009/jan/my-post/index. Bonsai uses tilt to promote agnostic template generation which I think is an awesome move, I wish all static generators would do this. Ultimately, I moved away from bonsai when I found that haml partials were unsupported and that I couldn't easily inject my own libraries into the runtime.


I hate Rules. Nanoc ships with a Rules file in your project's root directory. You use this file to tell Nanoc that all files living in the sass directory should be compiled with sass and all files in the blog directory should be compiled with Markdown. It's ridiculous, where the hell is tilt when you need it, file extensions exist for a reason you know? Besides having too-strict a routing engine, Nanoc is new enough (to me) to hold my interest and has enough features to enable me to write articles.

I'd like to take another look at webgen and toto, I think they both might have some things to offer. Each of these engines offer unique extras like syntax highlighting, feed generation, site maps, asset compression, etc. which I'd love to see wrapped up into one awesome, framework-agnostic library. Also, I'd like to come up with a workflow so I can better understand exactly what I need. Until then, I guess Nanoc will have to do.