docs/build.js
function generateHTML(fileName) {
  return new Promise( resolve => {
    const location = fileName === 'index.html' ? '/' : `/${fileName}`;
    match({routes, location}, (error, redirectLocation, renderProps) => {
      let html = ReactDOMServer.renderToString(
        <RouterContext {...renderProps} />
      );
      html = '<!doctype html>' + html;
      let write = fsp.writeFile(path.join(docsBuilt, fileName), html);
      resolve(write);
    });
  });
}
function generateHTML(fileName) {
  return new Promise( resolve => {
    const location = fileName === 'index.html' ? '/' : `/${fileName}`;
    match({routes, location}, (error, redirectLocation, renderProps) => {
      let html = ReactDOMServer.renderToString(
        <RouterContext {...renderProps} />
      );
      html = '<!doctype html>' + html;
      let write = fsp.writeFile(path.join(docsBuilt, fileName), html);
      resolve(write);
    });
  });
}
function generateHTML ( fileName ) { return new Promise ( resolve => { const location = fileName === 'index.html' ? '/' : ` ${ fileName } ` ; match ( { routes , location } , ( error , redirectLocation , renderProps ) => { let html = ReactDOMServer . renderToString ( < RouterContext { ... renderProps } / > ) ; html = '<!doctype html>' + html ; let write = fsp . writeFile ( path . join ( docsBuilt , fileName ) , html ) ; resolve ( write ) ; } ) ; } ) ; }
Generates HTML code for `fileName` page.

@param {string} fileName Path for Router.Route
@return {Promise} promise
@internal
Generates HTML code for fileName page .