0.02
Repository is archived
No commit activity in last 3 years
No release in over 3 years
The nanoc-toolbox is a collection of filters and helpers for the static site generator tool nanoc
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 10.3
~> 2.13

Runtime

~> 1.0
~> 3.7
~> 1.6
 Project Readme

nanoc-toolbox

Gem Version Build Status Dependency Status Coverage Status Code Climate

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

# Default Helpers provided By Nanoc
include Nanoc3::Helpers::Blogging
include Nanoc3::Helpers::Breadcrumbs

# Custom Helpers
include Nanoc::Toolbox::Helpers::Navigation
include Nanoc::Toolbox::Helpers::Gravatar

Documentation

API Documentation

The API documentation could be found on RubyDoc.info

Usage Guides

Some usage guides could be found on the GitHub wiki

Acknowledgments

All the people in this list

Author

Changelog

See the CHANGELOG file for details.

License

Copyright (c) 2011 Anouar ADLANI, nanoc-toolbox is released under the MIT license. See the LICENSE file for details.