Socket
Book a DemoInstallSign in
Socket

metalsmith-excerpts

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-excerpts

A Metalsmith plugin to extract an excerpt from HTML files.

latest
Source
npmnpm
Version
1.4.1
Version published
Maintainers
5
Created
Source

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

FAQs

Package last updated on 04 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts