metalsmith-replace
An attribute's value replace plugin for metalsmith
Last updated 6 years ago by jeremial .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install metalsmith-replace 
SYNC missed versions from official npm registry.

metalsmith-replace

NPM version Dependencies Status

An attribute's value replace plugin for metalsmith

use Applause to replace.

Install

metalsmith-replace

Usage

var metalSmith = require('metalsmith');
var replace = require('metalsmith-replace');

var metalsmith = metalSmith(__dirname);
metalsmith
    .source('post')
    .use(replace({
        title: {
            patterns: [{
                match: 'aaa',
                replacement: 'bbb'
            }]
        },
        content: {
            patterns: [{
                match: 'str1',
                replacement: function() {
                    return 'str2';
                }
            }]
        }
    }))
    .use(replace({
        title: {
            patterns: [{
                match: 'a.md',
                replacement: 'b.md'
            }]
        }
    }))
    .build();

Options

see Applause

License

MIT

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

9 Versions

  • 1.0.0                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |