Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including metalsmith-typography with all npm packages installed. Try it out:

var metalsmithTypography = require("metalsmith-typography")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

metalsmith-typography v0.1.1

A Metalsmith plugin to enhance typography — hanging punctuation, abbreviations, quotes and dashes

metalsmith-typography Build Status

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

CLI Usage

Install via npm and then add the metalsmith-typography key to your metalsmith.json plugins:

  "plugins": {
    "metalsmith-typography": {
      "lang": "en"

Javascript Usage

Pass options to the typography plugin and pass it to Metalsmith with the use method:

var typography = require('metalsmith-typography');

  lang: "en"

Call it after the metalsmith-markdown plugin, so that HTML files are available.


lang determines which language to use. en and ru supported, 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.



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free