A Metalsmith plugin to enhance typography in HTML — abbreviations, quotes and dashes, non-breaking spaces after prepositions. Based on Richtypo.js.
$ npm install metalsmith-typography
Install via npm and then add the
metalsmith-typography key to your
options to the typography plugin and pass it to Metalsmith with the
var typography = ;metalsmith;
Call it after the
metalsmith-markdown plugin, so that HTML files are available.
lang determines which language to use.
en is the default.
rules is an array of typographic rules to apply. Default is
'save_tags' 'cleanup_before' 'lite' 'spaces_lite' 'spaces' 'quotes' 'abbrs' 'cleanup_after' 'restore_tags'
See Richtypo.js documentation for the list of available rules.