Show a snippet of one item.
It use HTML-Truncator.
gem install nanoc-snippet
If you use bundler, add it to your Gemfile:
gem "nanoc-snippet", "~> 0.0.2"
Add to lib/default.rb:
require 'nanoc-snippet'
include Nanoc::Helpers::Snippet
In your layout:
<%= snippet(item) %>
Some options are available. See the code to see all.
(c) 2012-2015 Stormz
This code is free to use under the terms of the MIT license