diff --git a/docs/conf.py b/docs/conf.py index 773f2e36..725a1e2f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -513,6 +513,13 @@ def get_version(*file_paths): # # epub_use_index = True +# Intersphinx Extension Configuration +DIGITS_ONLY = r"^\d+$" +rtd_language = os.environ.get("READTHEDOCS_LANGUAGE", "en") +rtd_version = os.environ.get("READTHEDOCS_VERSION", "latest") +if re.search(DIGITS_ONLY, rtd_version): + # This is a PR build, use the latest versions of the other repos. + rtd_version = "latest" # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { @@ -522,6 +529,12 @@ def get_version(*file_paths): "https://docs.djangoproject.com/en/3.2/_objects/", ), "model_utils": ("https://django-model-utils.readthedocs.io/en/latest/", None), + "openedx-proposals": ( + # Not setting the version on purpose because we always want the latest version + # of OEPs + f"https://docs.openedx.org/projects/openedx-proposals/{rtd_language}/latest", + None, + ), } diff --git a/docs/decisions/0001-purpose-of-this-repo.rst b/docs/decisions/0001-purpose-of-this-repo.rst index ca3bce9f..1581708a 100644 --- a/docs/decisions/0001-purpose-of-this-repo.rst +++ b/docs/decisions/0001-purpose-of-this-repo.rst @@ -48,4 +48,4 @@ References - Technical Approach: `AuthZ `_ - PRD: `Roles & Permissions `_ -- OEP-66: `Authorization Best Practices `_ +- OEP-66: :ref:`Authorization Best Practices `