metalsmith-excerpts
A Metalsmith plugin to extract an excerpt from Markdown files.
Last updated 7 years ago by segmentio .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install metalsmith-excerpts 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.4.1                                ...           latest (20 days ago)

9 Versions

  • 1.4.1                                ...           20 days ago
  • 1.4.0                                ...           20 days ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           7 years ago
  • 0.3.1                                ...           7 years ago
  • 0.3.0                                ...           7 years ago
  • 0.2.0                                ...           7 years ago
Downloads
Today 0
This Week 1
This Month 29
Last Day 1
Last Week 1
Last Month 3
Dependencies (2)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |