Skip to content

Commit a33aee7

Browse files
committed
Do not mention "Manually creation" of the 404 HTML
1 parent 66ffbe9 commit a33aee7

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

docs/guides/custom-404-page.rst

+3-18
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,17 @@ As the ``404.html`` will be returned for all the URLs where the real page was no
1010
all its resources URLs and links must be absolute (start with a `/`),
1111
otherwise they will not work when a user clicks on them.
1212

13-
In case you want to follow the same style for the 404 page than your theme, you can either:
14-
15-
1. manually copy the source of any already rendered pages or,
16-
1. use the `sphinx-notfound-page`_ extension
17-
18-
19-
Manually creation
20-
-----------------
21-
22-
Once your docs are built, you can open any of the page already built and copy its source code,
23-
make all the links absolute and replace the content of the body with the one you like.
24-
25-
.. warning::
26-
27-
This method requires knowledge of HTML and some knowledge of how to build the URLs properly to work under Read the Docs,
28-
considering that the docs are usually served under ``/{language}/{version}/``.
29-
30-
After that, you have to define `html_extra_path`_ setting in your Sphinx's ``conf.py`` to include the ``404.html`` file created in the output.
13+
In case you want to follow the same style for the 404 page than your theme, you can use the `sphinx-notfound-page`_ extension.
3114

3215

3316
Using ``sphinx-notfound-page`` extension
3417
----------------------------------------
3518

3619
The ``sphinx-notfound-page`` extension helps you to create and automatically arrange all the URLs and file location without worry about them.
3720
You can define ``notfound_body`` setting in your Sphinx's ``conf.py`` with the content of the page.
21+
See it's documentation_ for more customization.
3822

3923

4024
.. _sphinx-notfound-page: https://github.com/humitos/sphinx-notfound-page
25+
.. _documentation: https://github.com/humitos/sphinx-notfound-page
4126
.. _html_extra_path: http://www.sphinx-doc.org/en/stable/usage/configuration.html#confval-html_extra_path

0 commit comments

Comments
 (0)