Skip to content

Commit 1194d75

Browse files
committed
docs: Add intersphinx mapping for OEPs
1 parent 6d3f774 commit 1194d75

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,13 @@ def get_version(*file_paths):
513513
#
514514
# epub_use_index = True
515515

516+
# Intersphinx Extension Configuration
517+
DIGITS_ONLY = r"^\d+$"
518+
rtd_language = os.environ.get("READTHEDOCS_LANGUAGE", "en")
519+
rtd_version = os.environ.get("READTHEDOCS_VERSION", "latest")
520+
if re.search(DIGITS_ONLY, rtd_version):
521+
# This is a PR build, use the latest versions of the other repos.
522+
rtd_version = "latest"
516523

517524
# Example configuration for intersphinx: refer to the Python standard library.
518525
intersphinx_mapping = {
@@ -522,6 +529,12 @@ def get_version(*file_paths):
522529
"https://docs.djangoproject.com/en/3.2/_objects/",
523530
),
524531
"model_utils": ("https://django-model-utils.readthedocs.io/en/latest/", None),
532+
"openedx-proposals": (
533+
# Not setting the version on purpose because we always want the latest version
534+
# of OEPs
535+
f"https://docs.openedx.org/projects/openedx-proposals/{rtd_language}/latest",
536+
None,
537+
),
525538
}
526539

527540

docs/decisions/0001-purpose-of-this-repo.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ References
4848

4949
- Technical Approach: `AuthZ <https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5176229910>`_
5050
- PRD: `Roles & Permissions <https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4724490259>`_
51-
- OEP-66: `Authorization Best Practices <https://docs.openedx.org/projects/openedx-proposals/en/latest/best-practices/oep-0066-bp-authorization.html>`_
51+
- OEP-66: :ref:`Authorization Best Practices <openedx-proposals:OEP-66 User Authorization>`

0 commit comments

Comments
 (0)