diff --git a/.ci/docker/requirements-ci.txt b/.ci/docker/requirements-ci.txt index b93b7b0283c..ff0277c2056 100644 --- a/.ci/docker/requirements-ci.txt +++ b/.ci/docker/requirements-ci.txt @@ -17,6 +17,7 @@ parameterized==0.9.0 # Doc build requirements, same as https://github.com/pytorch/pytorch/blob/main/.ci/docker/requirements-docs.txt sphinx==5.3.0 +sphinx-reredirects==0.1.4 sphinx-gallery==0.14.0 breathe==4.34.0 exhale==0.2.3 diff --git a/docs/source/conf.py b/docs/source/conf.py index a3c8baacb05..023c64149ec 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -62,6 +62,7 @@ "myst_parser", "sphinx_design", "sphinx_gallery.gen_gallery", + "sphinx_reredirects", ] if not FBCODE: @@ -195,6 +196,24 @@ "torch": ("https://pytorch.org/docs/stable/", None), } +# Redirects for moved pages +redirects = { + "getting-started-setup": "getting-started.html", + "export-overview": "using-executorch-export.html", + "runtime-build-and-cross-compilation": "using-executorch-building-from-source.html", + "tutorials/export-to-executorch-tutorial": "../using-executorch-export.html", + "running-a-model-cpp-tutorial": "using-executorch-cpp.html", + "build-run-vulkan": "backends-vulkan.html", + "executorch-arm-delegate-tutorial": "backends-arm-ethos-u.html", + "build-run-coreml": "backends-coreml.html", + "build-run-mediatek-backend": "backends-mediatek.html", + "build-run-mps": "backends-mps.html", + "build-run-qualcomm-ai-engine-direct-backend": "backends-qualcomm.html", + "build-run-xtensa": "backends-cadence.html", + "apple-runtime": "using-executorch-ios.html", + "tutorials/devtools-integration-tutorial": "../using-executorch-troubleshooting.html", +} + # Custom directives defintions to create cards on main landing page from custom_directives import ( # type: ignore[import-not-found]