Skip to content

chore: Add references to docs to make relative, not direct, references #716

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sarina
Copy link
Contributor

@sarina sarina commented Jun 8, 2025

Usage of :doc: is an antipattern. It is fragile and prone to breaking cross references when docs are moved or renamed.

Adding in .. _reference: syntax to files and headings means cross-references can instead be made with the :ref: directive, which will (presuming the references themselves are not deleted or renamed) be more robust to docs refactorings.

@sarina
Copy link
Contributor Author

sarina commented Jun 8, 2025

Note to self: There are a few :doc: directives that need to be changed by additional PRs to docs.openedx.org and openedx-events/openedx-filters. That will be follow-on work.

Copy link
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

Some inconsistencies in labeling but otherwise looks good.

@@ -2,6 +2,8 @@

.. Below is the display in the left sidebar on RTD. Please omit leading 0's

.. _OEP XXXX OEP Template:
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 sure why sphinx is not complaining about this, this label has been defined twice also it's only different from the label in oep-templates/adr-based-template.rst by one dash. Are these template files not processed by default or something?

Copy link
Contributor Author

@sarina sarina Jun 11, 2025

Choose a reason for hiding this comment

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

The top-level oep-templates directory is not processed in the build, the top-level oeps directory is considered the source dir.

@sarina sarina force-pushed the sarina/refs-cleanup branch from 7610a37 to 6e04ccf Compare June 11, 2025 15:02
@sarina sarina force-pushed the sarina/refs-cleanup branch from 6e04ccf to 30a1cab Compare June 12, 2025 13:32
@sarina sarina requested a review from feanil June 12, 2025 13:33
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.

2 participants