1
0
mirror of https://github.com/minio/docs.git synced 2025-07-28 19:42:10 +03:00

sphinx-reredirects redirect for mc admin top (#1027)

Add `sphinx-reredirects` extension and create a redirect for the former
`reference/minio-mc-admin/mc-admin-top.rst`.

To install locally:
```
pip3 install sphinx-reredirects
```
To test:
- Go to the old URL.
- You are redirected to the new deprecated URL.

Example:
```
http://192.241.195.202:9000/staging/DOCS-896-redirects/linux/reference/minio-mc-admin/mc-admin-top.html
```
redirects to
```
http://192.241.195.202:9000/staging/DOCS-896-redirects/linux/reference/deprecated/mc-admin-top.html
```


The redirect is server-side, browser without JS still gets the correct
redirected page.
This commit is contained in:
Andrea Longo
2023-10-06 10:26:35 -06:00
committed by GitHub
parent 6a1697c9f5
commit 07d94a4aa7
2 changed files with 11 additions and 1 deletions

View File

@ -43,6 +43,7 @@ extensions = [
'myst_parser',
'sphinx_design',
'sphinx.ext.intersphinx',
'sphinx_reredirects',
]
# -- External Links
@ -195,6 +196,14 @@ images_config = {
'override_image_directive' : True
}
# sphinx-reredirects redirect rules
# `.rst` for source assumed in the rules
# `.html` for target must be included
redirects = {
"reference/minio-mc-admin/mc-admin-top": "../deprecated/mc-admin-top.html"
}
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for