README.md

nanoc-toolbox

Presentation

The nanoc-toolbox is a collection of filters and helpers for the static site generator tool nanoc.
I have created this gem for my personal need on my blog/resume website.
If you feel something's missing, feel free to contribute.

Features

Helpers

Navigation: Menu, Breadcrumb, Table of contents,

Gravatar: Avatar Using the Gravatar System

HtmlTag: HTML Tag helper for other helpers

Google UA: Generate the JS code snipet for Universal Analytics

Google Analytics: Generate the JS code snipet for Analytics

Blogging Extra: Add extra blog post behavior

Tagging Extra: Add extra tagging behavior

Disqus: Disqus comments helper

Github Gist: Github Gist helper

Filters

AddSection: Section div's based on headers

HtmlTidy: Clean up the generated html code with Nokogiri

JS Minify: Minifies the JS files using JSMin

Requirements and compatibility

ruby >= 1.8.7: This gem has been tested against ruby 1.8.7 and 1.9.2

nanoc: It requires obviously the Nanoc gem

Nokogiri: For the HTML Tidy Filter

jsmin: For the JS Minify Filter

Installation

To use the nanoc-toolbox, you have to start by installing the gem.

gem install nanoc-toolbox

Then require the project main file in your default.rb file in the lib directory of your nanoc project.

require"nanoc/toolbox"

And the last step is to include the required helper or filter, anywhere in the lib directory of your lib directory.
The usage wants you to put it in the default.rb or the helpers.rb file.

The following example shows a sample helpers_.rb file in the lib directory