How to blog with nanoc

2013-06-23 / blinry / CC BY-SA 4.0 / meta, tech

This is a follow-up to “History of morr.cc”. 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/index.md 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

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


Comments?

Send a message to @blinry@chaos.social or drop me a mail at mail@blinry.org. Also, you can support me on Patreon or subscribe to my newsletter!