Merge items in nanoc

I have been trying to use nanoc for generating a static website. I need to organize a complex arrangement pages I want to keep my content DRY.

How does the concept of includes or merges work within the nanoc system? I have read the docs but I can't seem to find what I want.

For example: how can I take two partial content items and merge them together into a new content item.

In staticmatic you can do some like the following inside your page.

= partial('partials/shared/navigation')

How would a similar convention work within nanoc?


nanoc’s author here.

In nanoc, partials are layouts. So, you could have layouts/partials/shared/navigation.html and then render that partial like this:

= render '/partials/shared/navigation'

For that to work, enable the Rendering helper first, by including it somewhere in the lib/ dir (e.g. lib/helpers.rb):

include Nanoc3::Helpers::Rendering

For more information, check out the layouts as partials section of the manual.

Hope this helps!

Need Your Help

Making a window pop in and out of the edge of the screen

objective-c cocoa macos

I'm trying to re-write an application I have for Windows in Objective-C for my Mac, and I want to be able to do something like Mac's hot corners. If I move my mouse to the left side of the screen i...