metalsmith-widow

1.1.1 • Public • Published

metalsmith-widow Build Status NPM version Dependency Status

Add non breaking spaces to the ends of block level elements, with Metalsmith.

If you have any issues with the output of this plugin, please use the widow tracker.

Install via npm:

npm install metalsmith-widow --save

Example

var widow      = require('metalsmith-widow'),
    markdown   = require('metalsmith-markdown'),
    Metalsmith = require('metalsmith');
 
Metalsmith('fixtures')
    .use(markdown())
    .use(widow())
    .build(function (err) {
        if (err) {
            throw err;
        }
    });

With custom options:

Metalsmith('fixtures')
    .use(markdown())
    .use(widow({
        selectors: 'h1.h2.h3.h4.h5.h6'.split('.')
    }))
    .build(function (err) {
        if (err) {
            throw err;
        }
    });

Options

See the widow documentation.

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    2
  • 1.1.0
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i metalsmith-widow

Weekly Downloads

3

Version

1.1.1

License

MIT

Last publish

Collaborators

  • beneb