Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0229d2a

Browse files
authored
Docs: Use sphinx-notfound-page to show a nicer 404 page (#111084)
1 parent a35a305 commit 0229d2a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Doc/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@
2424
'sphinx.ext.doctest',
2525
]
2626

27-
# Skip if downstream redistributors haven't installed it
27+
# Skip if downstream redistributors haven't installed them
28+
try:
29+
import notfound.extension
30+
except ImportError:
31+
pass
32+
else:
33+
extensions.append('notfound.extension')
2834
try:
2935
import sphinxext.opengraph
3036
except ImportError:

Doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ blurb
1313

1414
sphinx-autobuild
1515
sphinxext-opengraph==0.7.5
16+
sphinx-notfound-page==1.0.0
1617

1718
# The theme used by the documentation is stored separately, so we need
1819
# to install that as well.

0 commit comments

Comments
 (0)