-
Notifications
You must be signed in to change notification settings - Fork 14.8k
docs: build with clean URLs #25718
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
docs: build with clean URLs #25718
Conversation
|
@mrpollo There is no way to test this locally because the live server always supports either clean or non-clean URLs. I did make the modification and test that. I also built the library locally and compared the output with Upshot, I suspect that with the suggested change this might work, but it is hard to tell. We'll probably have to deploy and test. |
2c8e2f4 to
81fd938
Compare
Signed-off-by: Ramon Roche <[email protected]>
81fd938 to
3ee2d49
Compare
|
@mrpollo @dakejahl Just some follow on testing What this change does is (I think) force Vitepress to open clean URLs by default and redirect to clean URLs by default. So if you open a sitebar you always get a clean URL, and if you enter https://docs.px4.io/main/en/flying/plan_safety_points.html it will redirect to https://docs.px4.io/main/en/flying/plan_safety_points I tested this and it works. The other builds do not use clean URLs so if you open a sidebar they will still have .html extension. I don't think it matters - all the URLs work if you navigate to the site so no links are broken. Thanks! |
|
@hamishwillee i realized the behavior on older releases was going to be different, but it also looks like its not a big deal. However I do have better visibility into 404's in the server logs now that we moved away from github pages, i will keep an eye for issues. |
|
Great. I have made v1.16 match. I don't think this will be any kind of problem |
Signed-off-by: Ramon Roche <[email protected]>
Enable clean urls for vitepress builds
cc @hamishwillee please verify this is actually building the files as we need them, suposedly creating directories with index files so the urls are clean