Skip to content

Instantly share code, notes, and snippets.

@woodyrew
Last active August 29, 2015 14:24
Show Gist options
  • Save woodyrew/db19b2c648e693d4f881 to your computer and use it in GitHub Desktop.
Save woodyrew/db19b2c648e693d4f881 to your computer and use it in GitHub Desktop.
Metalsmith Plugins
var Metalsmith = require('metalsmith');
var plugin_name = function (options) {
return function (files, metalsmith, done) {
console.log(files);
console.log(metalsmith);
done();
};
};
Metalsmith(__dirname)
.use(plugin_name({
some: "options"
, to : "pass to the plugin"
}))
.destination('./build')
.build(function (err) {
// For error handling
if (err) {
throw err;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment