diff --git a/docs/build.js b/docs/build.js index 6f9b8a666c..fb50d1c4a7 100644 --- a/docs/build.js +++ b/docs/build.js @@ -23,7 +23,9 @@ const readmeDest = path.join(docsBuilt, 'README.md'); */ function generateHTML(fileName) { return new Promise((resolve, reject) => { - Router.run(routes, '/' + fileName, Handler => { + const urlSlug = fileName === 'index.html' ? '/' : `/${fileName}`; + + Router.run(routes, urlSlug, Handler => { let html = React.renderToString(React.createElement(Handler)); html = '' + html; let write = fsp.writeFile(path.join(docsBuilt, fileName), html); diff --git a/docs/src/Routes.js b/docs/src/Routes.js index d31c5623f8..790880e163 100644 --- a/docs/src/Routes.js +++ b/docs/src/Routes.js @@ -10,11 +10,10 @@ import NotFoundPage from './NotFoundPage'; import {Route, DefaultRoute, NotFoundRoute} from 'react-router'; export default ( - + -