lib/hbs.js
function render_with_layout(template, locals, cb) {
    render_file(locals, function(err, str) {
      if (err) {
        return cb(err);
      }

      locals.body = str;

      var res = template(locals, handlebarsOpts);
      self.async.done(function(values) {
        Object.keys(values).forEach(function(id) {
          res = res.replace(id, values[id]);
        });

        cb(null, res);
      });
    });
  }
function render_with_layout(template, locals, cb) {
    render_file(locals, function(err, str) {
      if (err) {
        return cb(err);
      }

      locals.body = str;

      var res = template(locals, handlebarsOpts);
      self.async.done(function(values) {
        Object.keys(values).forEach(function(id) {
          res = res.replace(id, values[id]);
        });

        cb(null, res);
      });
    });
  }
function render_with_layout ( template , locals , cb ) { render_file ( locals , function ( err , str ) { if ( err ) { return cb ( err ) ; } locals . body = str ; var res = template ( locals , handlebarsOpts ) ; self . async . done ( function ( values ) { Object . keys ( values ) . forEach ( function ( id ) { res = res . replace ( id , values [ id ] ) ; } ) ; cb ( null , res ) ; } ) ; } ) ; }
render with a layout
render with a layout