metalsmith-widow
v1.1.1
Published
Add non breaking spaces to the ends of block level elements, with Metalsmith.
Downloads
13
Maintainers
Readme
metalsmith-widow
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