<commit_before>var React = require('react');

var main = require('./main.jsx');

function generate(url, options) {
  options = options || {};
  var reactElement = main.reactElementForPage(url || '/');
  var pageHTML = React.renderToString(reactElement);

  // Make sure any changes to this file are reflected in
  // index.html too.
  var content = (
    <html>
      <head>
        <meta charSet="utf-8"/>
        <meta name="url" value={url}/>
        {options.baseURL ? <base href={options.baseURL}/> : null}
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,700,600italic,700italic,800,800italic"/>
        <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css"/>
        <link rel="stylesheet" href={exports.CSS_FILENAME}/>
        <title>Mozilla Learning</title>
      </head>
      <body>
        <div id="page-holder" dangerouslySetInnerHTML={{
          __html: pageHTML
        }}></div>
        <script src={exports.JS_FILENAME}></script>
      </body>
    </html>
  );

  return React.renderToStaticMarkup(content);
};

exports.generate = generate;
exports.CSS_FILENAME = "stylesheet.css";
exports.JS_FILENAME = "bundle.js";
exports.URLS = Object.keys(main.PAGES);

if (typeof(document) !== 'undefined')
  React.render(
    reactElementForPage(
      document.querySelector('meta[name=url]').getAttribute('value')
    ),
    document.getElementById('page-holder')
  );<commit_msg>dynamic JS on static site works again.<commit_after>var React = require('react');

var main = require('./main.jsx');

function generate(url, options) {
  options = options || {};
  var reactElement = main.reactElementForPage(url || '/');
  var pageHTML = React.renderToString(reactElement);

  // Make sure any changes to this file are reflected in
  // index.html too.
  var content = (
    <html>
      <head>
        <meta charSet="utf-8"/>
        <meta name="url" value={url}/>
        {options.baseURL ? <base href={options.baseURL}/> : null}
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,700,600italic,700italic,800,800italic"/>
        <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css"/>
        <link rel="stylesheet" href={exports.CSS_FILENAME}/>
        <title>Mozilla Learning</title>
      </head>
      <body>
        <div id="page-holder" dangerouslySetInnerHTML={{
          __html: pageHTML
        }}></div>
        <script src={exports.JS_FILENAME}></script>
      </body>
    </html>
  );

  return React.renderToStaticMarkup(content);
};

exports.generate = generate;
exports.CSS_FILENAME = "stylesheet.css";
exports.JS_FILENAME = "bundle.js";
exports.URLS = Object.keys(main.PAGES);

if (typeof(document) !== 'undefined')
  React.render(
    main.reactElementForPage(
      document.querySelector('meta[name=url]').getAttribute('value')
    ),
    document.getElementById('page-holder')
  );
{'fraction_non_alphanumeric': 0.1618535930154466, 'fraction_numerical': 0.020819341840161182, 'mean_word_length': 3.5068078668683813, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3899450', 'n_tokens_mistral': 979, 'n_tokens_neox': 928, 'n_words': 170}