1.4.1 • Published 4 years ago

metalsmith-excerpts v1.4.1

Weekly downloads
353
License
MIT
Repository
github
Last release
4 years ago

metalsmith-excerpts

npm version code style: xo metalsmith: core plugin

Known Vulnerabilities

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

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

5 years ago

1.2.0

7 years ago

1.1.0

8 years ago

1.0.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago