metalsmith-replace
v1.0.0
Published
An attribute's value replace plugin for metalsmith
Downloads
6
Readme
metalsmith-replace
An attribute's value replace plugin for metalsmith
use Applause to replace.
Install
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