Important: This wiki is no longer in use. Use the nanoc wiki on GitHub instead. Not everything from this wiki was migrated to the new wiki because quite a bit was no longer relevant. The contents of the old wiki are nonetheless preserved here in case you need it.
← homepage

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.)