You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You may copy and paste them, or put them into a custom shell script. You may also customize them for another hosting provider.
906
+
Then run:
907
+
908
+
```sh
909
+
npm run deploy
910
+
```
901
911
902
912
Note that GitHub Pages doesn't support routers that use the HTML5 `pushState` history API under the hood (for example, React Router using `browserHistory`). This is because when there is a fresh page load for a url like `http://user.github.io/todomvc/todos/42`, where `/todos/42` is a frontend route, the GitHub Pages server returns 404 because it knows nothing of `/todos/42`. If you want to add a router to a project hosted on GitHub Pages, here are a couple of solutions:
903
913
* You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://github.com/reactjs/react-router/blob/master/docs/guides/Histories.md#histories) about different history implementations in React Router.
@@ -931,7 +941,7 @@ With this setup Netlify will build and deploy when you push to git or open a pul
931
941
2. Pick your Git hosting service and select your repository
932
942
3. Click `Build your site`
933
943
934
-
**Support for client site routing:**
944
+
**Support for client-side routing:**
935
945
936
946
To support `pushState`, make sure to create a `public/_redirects` file with the following rewrite rules:
0 commit comments