This package has been deprecated

Author message:

This package is no longer maintained and has moved to the @metalsmith org; Please migrate to the following package: @metalsmith/excerpts

metalsmith-excerpts

1.4.1 • Public • Published

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

/metalsmith-excerpts/

    Package Sidebar

    Install

    npm i metalsmith-excerpts

    Weekly Downloads

    246

    Version

    1.4.1

    License

    MIT

    Unpacked Size

    9.88 kB

    Total Files

    19

    Last publish

    Collaborators

    • f2prateek
    • ianstormtaylor
    • lambtron
    • segmentio
    • webketje
    • woodyrew