metalsmith-isolate

0.0.1 • Public • Published

metalsmith-isolate

A Metalsmith plugin that isolates files by a pattern. This allows you to apply other metalsmith plugins only to specific files.

  • can match files by pattern

Installation

$ npm install metalsmith-isolate

Usage

by pattern - this is just passing a globing pattern. The passed pattern can be a single pattern (as a string) or an array of globing patterns. For more information read the multimatch patterns documentation.

var isolate = require('metalsmith-isolate'),
	permalinks  = require('metalsmith-permalinks');

metalsmith.use(isolate(["*.md"]))
// apply other plugins only to *.md files
// e.g. permalinks
.use(permalinks({
	pattern: ':date/:title',
}))
// use empty selector to reset
.use(isolate());

Readme

Keywords

none

Package Sidebar

Install

npm i metalsmith-isolate

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • ocjojo