-
Couldn't load subscription status.
- Fork 66
fix(docs): add version to style guide redirects #453
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
base: main
Are you sure you want to change the base?
Conversation
| 'reference/doc-cheat-sheet-myst/': '/latest/reference/myst-syntax-reference', | ||
| 'reference/doc-cheat-sheet/': '/latest/reference/rst-syntax-reference', | ||
| 'reference/style-guide-myst/': '/latest/reference/myst-syntax-reference', | ||
| 'reference/style-guide/': '/latest/reference/rst-syntax-reference', |
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.
I'm not familiar with sphinx-reredirects, but this isn't ideal. We're mixing Sphinx and RTD concerns. Nothing in the slug should be reflected in redirects.
If we can't find a workaround, I think we should instead switch to rediraffe. It should be quick to set up.
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.
I concur. Next thing you know, we switch to stable, then something else, there will be no end to it.
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.
You can use /page/ to indicate the default version. It doesn't work with subprojects - but it does for anything on rtd-hosted or it's own domain.
'reference/style-guide/': '/page/reference/rst-syntax-reference',
For instance: https://canonical-starter-pack.readthedocs-hosted.com/page/tutorial/
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.
You should be able to use relative paths in the redirect to fix the path without specifying an RTD version. I'll suggest it.
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.
Try it this way.
| 'reference/doc-cheat-sheet-myst/': '/latest/reference/myst-syntax-reference', | ||
| 'reference/doc-cheat-sheet/': '/latest/reference/rst-syntax-reference', | ||
| 'reference/style-guide-myst/': '/latest/reference/myst-syntax-reference', | ||
| 'reference/style-guide/': '/latest/reference/rst-syntax-reference', |
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.
| 'reference/doc-cheat-sheet-myst/': '/latest/reference/myst-syntax-reference', | |
| 'reference/doc-cheat-sheet/': '/latest/reference/rst-syntax-reference', | |
| 'reference/style-guide-myst/': '/latest/reference/myst-syntax-reference', | |
| 'reference/style-guide/': '/latest/reference/rst-syntax-reference', | |
| 'reference/doc-cheat-sheet-myst/': '../myst-syntax-reference', | |
| 'reference/doc-cheat-sheet/': '../rst-syntax-reference', | |
| 'reference/style-guide-myst/': '../myst-syntax-reference', | |
| 'reference/style-guide/': '../rst-syntax-reference', |
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.
Can confirm this works.
CHANGELOG.mdwith relevant non-documentation file changes?The current docs redirects specify an absolute path with no version, resulting in a 404 (example).