Skip to content

Conversation

@jahn-junior
Copy link
Contributor

@jahn-junior jahn-junior commented Oct 14, 2025

  • Have you updated CHANGELOG.md with relevant non-documentation file changes?
  • Have you updated the documentation for this change?

The current docs redirects specify an absolute path with no version, resulting in a 404 (example).

Comment on lines +228 to +231
'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',
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Collaborator

@SecondSkoll SecondSkoll Oct 15, 2025

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/

Copy link
Collaborator

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.

@jahn-junior jahn-junior marked this pull request as draft October 14, 2025 19:54
Copy link
Collaborator

@minaelee minaelee left a 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.

Comment on lines +228 to +231
'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',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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',

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants