Skip to content

Commit a95ca25

Browse files
committed
Add sphinx-reredirects to handle redirects
- For example, installation.html now redirects to installation/index.html
1 parent 60dba78 commit a95ca25

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"sphinx_inline_tabs",
3737
"sphinx_removed_in",
3838
"sphinxext.opengraph",
39+
"sphinx_reredirects",
3940
]
4041

4142
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
@@ -350,3 +351,8 @@
350351
"pillow-logo-dark-text-1280x640.png"
351352
)
352353
ogp_image_alt = "Pillow"
354+
355+
# sphinx-reredirects
356+
redirects = {
357+
"installation.html": "installation/index.html"
358+
}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ docs = [
4747
"sphinx-inline-tabs",
4848
"sphinx-removed-in",
4949
"sphinxext-opengraph",
50+
"sphinx-reredirects",
5051
]
5152
fpx = [
5253
"olefile",

0 commit comments

Comments
 (0)