Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.8k
(WIP, NO MERGE) routerMode:history for the docsify site#1968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:develop
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vercelbot commentedJan 22, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The latest updates on your projects. Learn more aboutVercel for Git ↗︎
|
codesandbox-cibot commentedJan 22, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This pull request is automatically built and testable inCodeSandbox. To see build info of the built libraries, clickhere or the icon next to each commit SHA. Latest deployment of this branch, based on commit2da44fa:
|
Nice, the deployment works fine with it! F.e.https://docsify-preview-ll3a2gp9v-docsifyjs.vercel.app/markdown |
Old bookmarks will still work fine. Try the following (with a hash):https://docsify-preview-ll3a2gp9v-docsifyjs.vercel.app/#/language-highlight |
…single-page app mode with routerMode:history
025a89f
to61b94dd
Comparesy-records commentedJan 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Edit: seehttps://docsify-preview-git-routermode-history-for-website-docsifyjs.vercel.app/quickstart It works fine, but doesn't seem to show 404. Great job, but it seems that when using a browser to view the source code, it is a 404 page code, is this normal? |
trusktr commentedJan 26, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ah, you found an issue! There's actually two things happening in your screenshot: 1) For the vercel deploy, it is not using the 404.html trick, it is using vercel.json to rewrite URLs on the server. So for a path like What we can do is update the 2) For So, for vercel, the 404.html stuff is not needed, it is only for GitHub, and doesn't have the issue that Vercel does. For Vercel, I'll update vercel.json so it'll do what we want with the I've been experimenting onhttps://docs.lume.io. I'll bring back what I learn from there. |
Uh oh!
There was an error while loading.Please reload this page.
Summary
This allows us to deploy the Docsify site to a static server that handles unknown URLs with a default
404.html
page, for example GitHub Pages.As an example,https://docs.lume.io is published on GitHub pages. Notice that the URLs are in
history
mode, and you can refresh the site while on any path, and it works. Pushing to the github repo automatically updates the deployment using thisGitHub Actions file.What kind of change does this PR introduce?
Repo settings
Docs
For any code change,
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
Tested in the following browsers: