Skip to content

stormz/nanoc-snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Snippet

Show a snippet of one item.

It use HTML-Truncator.

Install

gem install nanoc-snippet

If you use bundler, add it to your Gemfile:

gem "nanoc-snippet", "~> 0.0.2"

Usage

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.

License

(c) 2012-2015 Stormz

This code is free to use under the terms of the MIT license

About

Show a snippet of one item.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages