metalsmith-excerpts

A Metalsmith plugin to add an excerpt to files.

Showing:

Popularity

Downloads/wk

302

GitHub Stars

21

Maintenance

Last Commit

1yr ago

Contributors

10

Package

Dependencies

2

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

metalsmith-excerpts

npm version code style: xo metalsmith: core plugin

Known Vulnerabilities Node CI

A Metalsmith plugin to extract an excerpt from HTML files.

The excerpt is scraped from first paragraph (<p> tag) of the rendered HTML.

If a file already has an excerpt value, that value will be returned.

Installation

$ npm install metalsmith-excerpts

CLI Usage

Install via npm and then add the metalsmith-excerpts key to your metalsmith.json plugin, like so:

{
  "plugins": {
    "metalsmith-excerpts": true
  } 
}

Javascript Usage

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

metalsmith.use(excerpts());

If you pass a multipleFormats: true option to the plugin, it will put store an excerpt object like { html: '...', text: '...' };

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial