index.js
function applyLayout(chunk) {
    chunk.data.contents = String(chunk.contents);
    var layout = getLayout(chunk.data.layout),
        contents = options.renderTemplate(layout.contents, chunk.data, layout.path);
    chunk.contents = new Buffer(contents);
    return chunk;
  }
function applyLayout(chunk) {
    chunk.data.contents = String(chunk.contents);
    var layout = getLayout(chunk.data.layout),
        contents = options.renderTemplate(layout.contents, chunk.data, layout.path);
    chunk.contents = new Buffer(contents);
    return chunk;
  }
function applyLayout ( chunk ) { chunk . data . contents = String ( chunk . contents ) ; var layout = getLayout ( chunk . data . layout ) , contents = options . renderTemplate ( layout . contents , chunk . data , layout . path ) ; chunk . contents = new Buffer ( contents ) ; return chunk ; }
set chunk contents as template data property and render it with a layout
@param  {object} chunk stream chunk object
@return {object}       chunk with applied layout
set chunk contents as template data property and render it with a layout