Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

cboone/nanoc-escaped-erubis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Escaped Erubis filter for Nanoc.

A minor, but useful, modification of Nanoc's default Erubis filter, by Christopher Boone.

The Escaped Erubis filter works exactly like the regular Erubis filter, except that it uses Erubis::EscapedEruby in place of Erubis::Eruby. The EscapedEruby class switches the behavior of <%= %> and <%== %>, meaning that <%= %> escapes its contents and <%== %> does not. (The opposite of standard Erubis and Erb behavior.)

The Escaped Erubis filter also includes the ErboutEnhancer, which makes Eruby use _erbout as its buffer, in addition to its usual _buf. Thus filters and other code, such as those included with Nanoc, that assume you're using Erb, and that Erb is using _erbout, will work correctly when filtered with Escaped Erubis.

Installation

Just drop the filters folder into your project's /lib directory.

Or, if /lib/filters already exists, then add the escaped_erubis.rb file to it.

Usage

To filter an item with Escaped Erubis, use:

filter :escaped_erubis

To filter a layout, use something like this:

layout '*', :escaped_erubis

More information

Erubis

Nanoc filters

Nanoc

About

Erubis::EscapedEruby filter for Nanoc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages