Skip to content

Commit 000776a

Browse files
authored
Use sphinx-notfound-page to create a 404 page matching the theme (#1042)
1 parent 21d6d8d commit 000776a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
extensions = [
99
'custom_roles',
10+
'notfound.extension',
1011
'sphinx.ext.intersphinx',
1112
'sphinx.ext.todo',
1213
'sphinx_copybutton',
@@ -140,6 +141,9 @@
140141

141142
todo_include_todos = True
142143

144+
# sphinx-notfound-page
145+
notfound_urls_prefix = "/"
146+
143147
# sphinxext-opengraph config
144148
ogp_site_url = "https://devguide.python.org/"
145149
ogp_site_name = "Python Developer's Guide"

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Sphinx==6.1.3
22
furo>=2022.6.4
33
jinja2
44
sphinx-lint==0.6.7
5+
sphinx-notfound-page
56
sphinx_copybutton>=0.3.3
67
sphinxext-opengraph>=0.7.1
78
sphinxext-rediraffe

0 commit comments

Comments
 (0)