-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect /docs/latest-version to /docs/ #7087
Comments
Hi! Our docs plugin never sets up redirects, see also #3407. You need to set up any kind of redirect yourself, either server-side (through 304) or client-side (through the client-redirects plugin). You can also try the versions option and configure |
@Josh-Cena we discussed a "version aliases" feature in the past but it never got implemented. That looks quite similar to the current use case and could be useful. Did a rough design here: #3285 |
Unless I'm misunderstanding, the versions plugin looks like a configuration for each version? Feels a little clunky for a resolution. Going to take a deeper look, but not entirely sure that this would support both versioned url + latest version url. We need both of these - one for documentation that needs to point to the latest (readme's in repos) and then specific points for pointing to the latest via version (release announcements, etc.) to preserve history Server-side isn't really a viable option for us as we would have to submit a request through a different team each time we do a release |
@legacydev please explain your problem in a more concrete way, giving example URLs and expected content (or redirect, client or server) at each URL. It's hard to understand in text form.
There are solutions with modern CDN hosts (Netlify, Vercel and even homemade...) so that redirects can be committed to Git and controlled directly by devs |
@slorber Today I meet a requirement that exactly needs the version alias feature - for your information :) See also apache/pulsar#17438. |
@slorber and I maunally do the redirect as apache/pulsar-site#288. |
@tisonkun FYI the redirect is always done better server-side. In my opinion your implemented solution is not ideal either, you'd better use a server redirect. For example, using a _redirects file on Netlify it's as simple as adding one of those 3 declarations:
And the non-redirect alias can be achieved pretty simply with Hope this helps |
@slorber Thanks for your information! The Apache Pulsar website is hosted on an Apache Web Server (of course, lol) and I'm still learning how to configure server-side redirections programmatically... For example, if you |
😅 I can't tell you how to configure Apache Web Server unfortunately, it's been a while I haven't touched that and I don't really regret it 😄 |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
I need to link to the latest version specifically for future proofing (release links, etc). Ex: https://docusaurus.io/docs/2.0.0-beta.18
However, this results in "Not found".
2.0.0-beta.18 does exist at https://docusaurus.io/docs.
I expect https://docusaurus.io/docs/2.0.0-beta.18 to resolve to https://docusaurus.io/docs
Reproducible demo
No response
Steps to reproduce
Expected behavior
I expect https://docusaurus.io/docs/2.0.0-beta.18 to resolve to https://docusaurus.io/docs
Actual behavior
It goes to "Not found" page
Your environment
Self-service
The text was updated successfully, but these errors were encountered: