Serve page on github-pages
See original GitHub issueHello, I have problem serving my app on gh-page.
In development mode everything works fine. In production environment (I’m hosting on gh-pages) I can’t visit my sub-pages directly. That is I can’t go directly to e.g. https://preview.pro.ant.design/dashboard/analysis because it throws me github 404 page. Instead I have to go first to https://preview.pro.ant.design, and then to the dashboard/analysis
through umi router. I’ve copied the exact config that this project has, but it still doesn’t work. How does the https://preview.pro.ant.design solved this issue ? It looks like it’s hosted on gh-pages as well https://github.com/ant-design/ant-design-pro/tree/gh-pages .
And it doesn’t use history : { type: 'hash' }
how did they achieve it ?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:11
Top Results From Across the Web
GitHub Pages | Websites for you and your projects, hosted ...
Websites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live.
Read more >About GitHub Pages
GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs...
Read more >Creating a GitHub Pages site
You can create a GitHub Pages site in a new or existing repository. GitHub Pages is available in public repositories with GitHub Free...
Read more >Quickstart for GitHub Pages - GitHub Docs
In the upper-right corner of any page, use the drop-down menu, and select New repository. · Enter username.github.io as the repository name. ·...
Read more >Basic steps for hosting on Github
Steps for Hosting a Website on GitHub · Create a GitHub account on github.com. · Download either GitHub for Mac or GitHub for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, you just need to add a custom 404.html to override the default 404 page of Github Pages I think you can just
cp index.html 404.html
@stasbar I’ve tried setting in config.js:
After building and re-deploying to Github Pages, my site at http://finances.fyi/home-mortgage still returns the Github 404 error.