code: function transformChunkContents(chunk) {
      var contents = String(chunk.contents);
      try {
        if (chunk.isMarkdown) {
          contents = options.renderMarkdown(contents);
        }
        if (chunk.isTemplate) {
          contents = options.renderTemplate(contents, chunk.data, chunk.data.srcPath);
        }
        chunk.contents = new Buffer(contents);
        if (chunk.data.layout) applyLayout(chunk);
      } catch (err) {
        this.emit('error', new PluginError(logFlag, err.stack || err));
      }
      return chunk;
    }
docs: render chunk contents with markdown renderer, wrap layout, render template
  @param  {object} chunk stream chunk object
  @return {object}       chunk with transformed contents