1.1.1 • Published 9 years ago

metalsmith-widow v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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