code: function massageMarkdown(markdown, options) {
    var headerRegex = /^#{1,6} /;
    var h2Regex = /^## (.*)$/;
    var lines = markdown.split('\n');
    var tableOfContents = [
      '### Methods\n'
    ];
    // The jekyll yml frontmatter
    var frontmatter = [
      '---',
      'layout: page',
      'title: ' + options.title,
      '---'
    ];
    var processedMarkdown;
    var h2;
    var tocLine;
  
    function dasherize(str) {
      return str.toLowerCase().replace(/[^\w]+/g, '-');
    }
  
    // For each line, if the line is a heading, increase its level by 1.
    // (I.e., there shouldn't be any H1s in the Markdown.)
    for (var i = 0; i < lines.length; i++) {
      if (lines[i].match(headerRegex)) {
        lines[i] = '#' + lines[i];
      }
  
      h2 = lines[i].match(h2Regex);
  
      if (h2) {
        // - [Header text](#header-text)
        tocLine = '- [' + h2[1] + ']' + '(#' + dasherize(h2[1]) + ')';
  
        tableOfContents.push(tocLine);
      }
    }
  
    // Place the markdown inside a Liquid '{% raw %}{% endraw %}' block
    // so that '{{component-name}}' hbs tags are rendered in code blocks.
    // (Liquid will parse them as Liquid tags otherwise.)
    processedMarkdown = frontmatter.join('\n') + '\n\n' +
      '{% raw %}\n' +
      tableOfContents.join('\n') + '\n\n' +
      lines.join('\n') +
      '{% endraw %}';
  
    return new RSVP.Promise(function(resolve) {
      resolve(processedMarkdown);
    });
  }
docs: /* Takes Markdown and adds yml frontmatter and a table of contents, and adds 1 to
  the level of headings.
  
  @param {string} markdown - Unmassaged markdown.
  @returns {Promise} (resolves {string}) A promise that resolves with the massaged Markdown text representation.