Skip to content

Instantly share code, notes, and snippets.

@doowb
Created October 31, 2013 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doowb/7253948 to your computer and use it in GitHub Desktop.
Save doowb/7253948 to your computer and use it in GitHub Desktop.
Assemble plugin to modify page contents.
var options = {
stage: 'assemble:post:pages'
};
var plugin = function(params, next) {
var buildPaginationInfo = function() {
var pages = params.assemble.options.pages;
for (var i = 0; i < pages.length; i++) {
// get current page content
var content = pages[i].page;
content = '<h1>ALL YOUR PAGE BELONG TO US</h1>';
pages[i].page = content;
}
};
next();
};
// export options
plugin.options = options;
module.exports = plugin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment