@@ -10,32 +10,17 @@ As the ``404.html`` will be returned for all the URLs where the real page was no
10
10
all its resources URLs and links must be absolute (start with a `/ `),
11
11
otherwise they will not work when a user clicks on them.
12
12
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.
31
14
32
15
33
16
Using ``sphinx-notfound-page `` extension
34
17
----------------------------------------
35
18
36
19
The ``sphinx-notfound-page `` extension helps you to create and automatically arrange all the URLs and file location without worry about them.
37
20
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.
38
22
39
23
40
24
.. _sphinx-notfound-page : https://github.com/humitos/sphinx-notfound-page
25
+ .. _documentation : https://github.com/humitos/sphinx-notfound-page
41
26
.. _html_extra_path : http://www.sphinx-doc.org/en/stable/usage/configuration.html#confval-html_extra_path
0 commit comments