]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: Use sphinx-notfound-page to show a nicer 404 page (#111084)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Sat, 2 Dec 2023 17:41:40 +0000 (19:41 +0200)
committerGitHub <noreply@github.com>
Sat, 2 Dec 2023 17:41:40 +0000 (17:41 +0000)
Doc/conf.py
Doc/requirements.txt

index f1b411126c4e8716d6fa168b73cecc0506ecb18f..be2a86e12fa2e4fc8b1f1e3d1d5f287a613e903d 100644 (file)
@@ -24,7 +24,13 @@ extensions = [
     'sphinx.ext.doctest',
 ]
 
-# Skip if downstream redistributors haven't installed it
+# Skip if downstream redistributors haven't installed them
+try:
+    import notfound.extension
+except ImportError:
+    pass
+else:
+    extensions.append('notfound.extension')
 try:
     import sphinxext.opengraph
 except ImportError:
index ce87be2d39282452b990e13e05b23940842d82e2..04334fd5a464d4da338efe1a5e99872bdcdb7aa7 100644 (file)
@@ -13,6 +13,7 @@ blurb
 
 sphinx-autobuild
 sphinxext-opengraph==0.7.5
+sphinx-notfound-page==1.0.0
 
 # The theme used by the documentation is stored separately, so we need
 # to install that as well.