Skip to content

Commit 5777a01

Browse files
authored
Merge pull request #10902 from Calinou/404-page-hide-user-notes
Hide user notes on 404 page
2 parents 465b800 + 2bfc2f0 commit 5777a01

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

404.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
:github_url: hide
2+
:allow_comments: False
3+
4+
Page not found
5+
==============
6+
7+
.. https://github.com/readthedocs/sphinx-notfound-page
8+
9+
.. raw:: html
10+
11+
<p>
12+
Sorry, we couldn't find that page. It may have been renamed or removed
13+
in the version of the documentation you're currently browsing.
14+
</p>
15+
<p>
16+
If you're currently browsing the
17+
<em>latest</em> version of the documentation, try browsing the
18+
<a href="/en/stable/"><em>stable</em> version of the documentation</a>.
19+
</p>
20+
<p>
21+
Alternatively, use the
22+
<a href="#" onclick="$('#rtd-search-form [name=\\'q\\']').focus()">Search docs</a>
23+
box on the left or <a href="/">go to the homepage</a>.
24+
</p>

conf.py

-23
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,6 @@
2929
# Disable collapsing tabs for codeblocks.
3030
sphinx_tabs_disable_tab_closing = True
3131

32-
# Custom 4O4 page HTML template.
33-
# https://github.com/readthedocs/sphinx-notfound-page
34-
notfound_context = {
35-
"title": "Page not found",
36-
"body": """
37-
<h1>Page not found</h1>
38-
<p>
39-
Sorry, we couldn't find that page. It may have been renamed or removed
40-
in the version of the documentation you're currently browsing.
41-
</p>
42-
<p>
43-
If you're currently browsing the
44-
<em>latest</em> version of the documentation, try browsing the
45-
<a href="/en/stable/"><em>stable</em> version of the documentation</a>.
46-
</p>
47-
<p>
48-
Alternatively, use the
49-
<a href="#" onclick="$('#rtd-search-form [name=\\'q\\']').focus()">Search docs</a>
50-
box on the left or <a href="/">go to the homepage</a>.
51-
</p>
52-
""",
53-
}
54-
5532
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
5633
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
5734

0 commit comments

Comments
 (0)