[PATCH] docs: redirect from old arch to the new one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Due to a recent reorganization of 'CPU Architectures', the links to
the documentation from external resources were rendered invalid.
This is a common challenge when attempting to make changes
while maintaining backward compatibility. To address this issue,
a commit has been made which uses sphinx extension to seamlessly
redirect users from the old location of the page to the new one.


Signed-off-by: Costa Shulyupin <costa.shul@xxxxxxxxxx>
---
 Documentation/conf.py                 | 8 +++++++-
 Documentation/sphinx/requirements.txt | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 37314afd1ac8..514bfe6a8166 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -55,7 +55,13 @@ needs_sphinx = '1.7'
 extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include',
               'kfigure', 'sphinx.ext.ifconfig', 'automarkup',
               'maintainers_include', 'sphinx.ext.autosectionlabel',
-              'kernel_abi', 'kernel_feat']
+              'kernel_abi', 'kernel_feat',
+              'sphinx_reredirects',
+]
+
+redirects = {
+     "arch.html": "arch/index.html",
+}
 
 if major >= 3:
     if (major > 3) or (minor > 0 or patch >= 2):
diff --git a/Documentation/sphinx/requirements.txt b/Documentation/sphinx/requirements.txt
index 335b53df35e2..0b067e985edb 100644
--- a/Documentation/sphinx/requirements.txt
+++ b/Documentation/sphinx/requirements.txt
@@ -1,3 +1,4 @@
 # jinja2>=3.1 is not compatible with Sphinx<4.0
 jinja2<3.1
 Sphinx==2.4.4
+sphinx_reredirects
-- 
2.40.0




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux