Tag: nanoc

Smartening up haml in nanoc

I’ve been tidying up around the place. Do you like it? It feels a lot cleaner to me.

(RSS subscribers are encouraged at this point to follow the link and read the article on the website proper.)

Custom markup in nanoc

If you’re maintaining a blog, you will probably want to put images in your posts at some point. If you have some fancy server-side blogging software to do this for you, you’re set. If, however, you’re using a set of files on your local drive, which somehow get turned into a website, you have to maintain your post images yourself.

This is the current setup, assuming I wrote a blog post in May 2014 which contained two images, “image.jpg” and “image2.jpg”:

Streamlining rules in nanoc

Nanoc is an excellent static site generator. Probably my favourite feature is the rule-based document generation system. This system makes it incredibly easy to “pipe” documents from a given folder or point in your file hierarchy to a specific url on your site, with support for as many filters as you want between the document and the unfinished product.

Rules come in three flavours, but we’re interested in two for this article: compile rules and routing rules. Compile rules tell a file what it should look like when it appears on the internet, while routing rules tell a file where it should end up relative to your site’s root:

Further renovation

Hey folks! Over the past week or so I’ve been playing around with shifting my site from jekyll to nanoc. This post is mainly to mention that in the next few days I’ll probably be shifting the site from one format to the other.

From what? To what?

Jekyll is a static site generator (SSG) written in ruby. Nanoc is also an SSG written in ruby. They’re both ways of turning a collection of documents into a static website, but I’ve recently been wondering if jekyll was the right fit for me. Last week, in a fit of pique, I decided to work out how hard it’d be to switch my current site over. The answer: not so hard at all.