From e644ade6dfbba6c623ef270c395e10b2f3a95b79 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 17 Jul 2023 17:05:26 -0400 Subject: [PATCH] docs: Redirect all technical doc pages. We publish the two pages that were being published under here to the new edx-platform docs under docs.openedx.org so update this doc site to redirect to that site for all pages. Once this version has been published, we should be safe to remove this doc project from the platform and all future changes should go through the single edx-platform docs site. --- docs/technical/conf.py | 19 ++++++++++++++----- requirements/edx/doc.in | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/technical/conf.py b/docs/technical/conf.py index afa3bdefee..3b36915217 100644 --- a/docs/technical/conf.py +++ b/docs/technical/conf.py @@ -9,13 +9,22 @@ import git # -- Project information ----------------------------------------------------- project = "edx-platform Technical Reference" -copyright = f'{datetime.now().year}, Axim Collaborative, Inc' # pylint: disable=redefined-builtin -author = 'Axim Collaborative, Inc' +copyright = f"{datetime.now().year}, Axim Collaborative, Inc" # pylint: disable=redefined-builtin +author = "Axim Collaborative, Inc" release = "" # -- General configuration --------------------------------------------------- -extensions = ["code_annotations.contrib.sphinx.extensions.featuretoggles", "code_annotations.contrib.sphinx.extensions.settings"] +extensions = [ + "code_annotations.contrib.sphinx.extensions.featuretoggles", + "code_annotations.contrib.sphinx.extensions.settings", + "sphinx_reredirects", +] + +redirects = { + "*": "https://docs.openedx.org/projects/edx-platform/en/latest/$source.html", +} + templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] @@ -38,7 +47,7 @@ settings_repo_version = edx_platform_version # -- Options for HTML output ------------------------------------------------- -html_theme = 'sphinx_book_theme' +html_theme = "sphinx_book_theme" html_static_path = ["_static"] html_favicon = "https://logos.openedx.org/open-edx-favicon.ico" html_logo = "https://logos.openedx.org/open-edx-logo-color.png" @@ -72,5 +81,5 @@ html_theme_options = { rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/" >Creative Commons Attribution-ShareAlike 4.0 International License. - """ + """, } diff --git a/requirements/edx/doc.in b/requirements/edx/doc.in index 4772c4dc13..013bafc42e 100644 --- a/requirements/edx/doc.in +++ b/requirements/edx/doc.in @@ -9,3 +9,4 @@ Sphinx # Documentation builder sphinx-design # provides various responsive web-components sphinxcontrib-openapi[markdown] # Be able to render openapi schema in a sphinx project sphinxext-rediraffe # Quickly and easily redirect when we move pages around. +sphinx-reredirects # Redirect from a sphinx project out to other places on the web including other sphinx projects