Writes given HTML AST to output index.html
function writeOutputHTML(dir, html) {
  const outputPath = pathJoin(dir, 'index.html');
  mkdirp.sync(path.dirname(outputPath));
  writeFileSync(outputPath, serialize(html));
}