Tips/EnhancingSiteTypography

Enhancing the typography on your site

RubyPants (a Ruby port of SmartyPants) can be used to improve the typography of a HTML page by replacing "--" with proper em dashes, replacing "..." with proper ellipsises, converting straight quotation marks into proper curly quotation marks, and more.

To use this filter with nanoc, add filter :rubypants to the compilation block in the Rules file, like this:

compile '/some/item/' do
  filter :rubypants
end

Note that some filters provide this functionality out of the box. At least  Textile( RedCloth) is known to do so.  Markdown( RDiscount) does not. (Here is a List of Built-in Filters.)