0.0.1 • Published 7 years ago
metalsmith-isolate v0.0.1
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());
0.0.1
7 years ago