-
Notifications
You must be signed in to change notification settings - Fork 31
Fix redirects to match the correct build #607
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
Conversation
|
Oh I think I know what is going on here. In the main builds we are using the I think the redirects config are correct but the build preview commands are wrong. I can confirm the brev redirect works for me if I run |
|
🤔 But it's not working on the deployed docs. If you go to https://docs.rapids.ai/deployment/stable/platforms/brev-dev/ it redirects to https://docs.rapids.ai/cloud/nvidia/brev/ with a Page Not Found.
|
|
Sure but that's a different problem where it doesn't know about the base URL. It is redirecting as expected, but to the wrong location relative to the final publishing URL. We can configure the base url in |
|
Oh I see, is there a way of configuring the base url to be either stable/ or nightly/ depending on the situation? I haven't investigated this, but if you have any pointers I can try to work this one out. |
|
I had a tinker with it this morning and I think the best solution here is to use relative paths in the redirect. This way it shouldn't matter whether the baseurl is https://docs.rapids.ai/deployment/stable/, https://docs.rapids.ai/deployment/nightly/ or http://localhost:8000/ as it will just walk back up the tree to the right relative point. diff --git a/source/conf.py b/source/conf.py
index fef5089..f57f2c6 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -158,8 +158,8 @@ intersphinx_mapping = {
}
redirects = {
- "platforms/brev-dev": "/cloud/nvidia/brev/",
- "guides/l4-gcp": "/cloud/gcp/",
+ "platforms/brev-dev": "../../cloud/nvidia/brev/",
+ "guides/l4-gcp": "../../cloud/gcp/",
} |
|
To check it works locally, build using |
7ab3c16 to
110cefb
Compare
|
Should we update docs to ensure we always mention |
|
Updated the README to do the autobuild with dirhtml. |
jacobtomlinson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great thanks!

Closes #592
I think the reason why this work and before it wasn't, is because what is on this PR matches the sphinx's builder
sphinx-autobuild source build/htmlwhere outputs are *.html (e.g., platforms/brev-dev.html) rather than directories.That being said. I'm still unsure if we want to keep this redirects, as I don't see how someone will purposely navigate to
platforms/brev-dev. They'll have to type it or have it booked marked. But that's a separate discussion, happy to keep start a new issue if we want to discuss this.