Skip to content

Instantly share code, notes, and snippets.

@jonschlinkert
Created May 3, 2014 20:41
Show Gist options
  • Save jonschlinkert/a21708f4842f6a922e1b to your computer and use it in GitHub Desktop.
Save jonschlinkert/a21708f4842f6a922e1b to your computer and use it in GitHub Desktop.
This is all you need to create middleware for assemble.
module.exports = function (assemble) {
var middleware = function(params, next) {
// do stuff
next();
};
// When do you want the plugin to run?
middleware.event = 'page:after:render';
return {
'assemble-middleware-foo': middleware
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment