How to blog with nanoc

2013-06-23 / Sebastian Morr / CC BY-NC-SA 4.0 / meta, tech

This is a follow-up to “History of”. I’d like to show you how this blog is created using the fantastic static site generator “nanoc”.

Why would you want static sites?

To be short: Simplicity, security, speed.

OK, how does it work?

You can look at this blog’s source code on GitHub.

This is all tied together by the Rules file, which contains several types of instructions. Files in the content directory are treated as items with an identifier that is the file’s path minus their filename extension. A file like content/how-to-blog-with-nanoc/ has the identifier /how-to-blog-with-nanoc/.

Now, when executing nanoc, all these rules are applied and the result is put in the output folder. nanoc deploy uploads this folder to my web server (the configuration for that is in nanoc.yaml. Very handy is nanoc aco, that starts a web server locally, lets you preview your site and autocompiles everything that is needed when refreshing a page.

And, that’s really everything.

Resources contains everything you need to know to build your own nanoc powered site. Have fun!


You can reach me at @blinry or at, see the about page.

For more like this, check out the home page, follow me on Twitter or subscribe to this site's feed.