function createIndexPage(isLocal) {
  const htmlContents = fs.readFileSync(`./gh-pages/_index.html`).toString();

  const indexBase = `<!DOCTYPE html>
<html lang="en-US">

<head>
  <meta charset='utf-8'>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,maximum-scale=2">
  <title></title>
</head>

<body class="root">
  <!-- HEADER -->
  <nav id="toolbar">
    <div class="site-width layout horizontal">
      <a href="https://google.github.io/blockly-samples/"><img src="https://blocklycodelabs.dev/images/logo_knockout.png" class="logo-devs"
          alt="Blockly" /></a>
    </div>
    <a class="button" href="https://github.com/google/blockly-samples">View on GitHub</a>
  </nav>
  <main id="main" class="index">
    <div class="drop-shadow"></div>
    <header id="banner">
      <div class="site-width">
        <h1 class="banner-title">Blockly Plugins &amp; Demos</h1>
        <p>
          Explore reusable Blockly plugins or view demos of how to use different Blockly features in your app or service.
        </p>
      </div>
    </header>
    <div class="site-width">
      <div class="container">
        ${htmlContents}
      </div>
    </div>
  </main>
</body>

</html>
`;

  const title = 'Blockly Plugins &amp; Demos';
  let contents = injectHeader(indexBase, title, isLocal);
  contents = injectFooter(contents);
  const outputPath = path.join('gh-pages', 'index.html');
  fs.writeFileSync(outputPath, contents, 'utf-8');
}
Create the index page for the blockly-samples GitHub Pages site.
This page has some nice wrappers and links to plugins and demos
sourced from _index.html.
@param {boolean} isLocal True if building for a local test. False if
  building for gh-pages.