old_contents: "use strict";
  var jade = require('jade'),
      fs = require('fs-extra'),
      async = require('async'),
      path = require('path');
  
  
  module.exports = function(ctx, done){
      if(!ctx.pages){
          return done();
      }
  
      async.parallel(Object.keys(ctx.pages).map(function(src){
          return function(cb){
              var dest = ctx.pages[src].dest;
              async.waterfall([
                  function prepare(callback){
                      fs.mkdirs(path.dirname(dest), callback);
                  },
                  function read(_, callback){
                      fs.readFile(src, 'utf-8', callback);
                  },
                  function render(buf, callback){
                      var opts = {
                          'filename': src,
                          'url': function(p){
                              return ctx.config.url + p;
                          },
                          'pretty': true
                      };
                      jade.render(buf, opts, callback);
                  },
                  function write(buf, callback){
                      ctx.writeFile(dest, buf, callback);
                  }
              ], cb);
          };
      }), done);
  };
  
new_contents: "use strict";
  var jade = require('jade'),
      fs = require('fs-extra'),
      async = require('async'),
      path = require('path');
  
  
  
  module.exports = function(ctx, done){
      if(!ctx.pages){
          return done();
      }
  
      async.parallel(Object.keys(ctx.pages).map(function(src){
          return function(cb){
              module.exports.render(ctx, src, ctx.pages[src].dest, done);
          };
      }), done);
  };
  
  module.exports.render = function(ctx, src, dest, done){
      async.waterfall([
          function prepare(callback){
              fs.mkdirs(path.dirname(dest), callback);
          },
          function read(_, callback){
              fs.readFile(src, 'utf-8', callback);
          },
          function render(buf, callback){
              var opts = {
                  'filename': src,
                  'url': function(p){
                      return ctx.config.url + p;
                  },
                  'pretty': true
              };
              jade.render(buf, opts, callback);
          },
          function write(buf, callback){
              ctx.writeFile(dest, buf, callback);
          }
      ], done);
  };
subject: Make it accessible elsewheres