Skip to content

Commit 492c7d8

Browse files
authored
Add 404 page (#1703)
* Add 404 page Signed-off-by: Uilian Ries <[email protected]> * Update 404 page Signed-off-by: Uilian Ries <[email protected]>
1 parent 060c170 commit 492c7d8

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

404.rst

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:orphan:
2+
3+
Page Not Found
4+
==============
5+
6+
Unfortunately, the page you are looking for does not exist or was removed.
7+
8+
You can look into our reference tree, or use the search bar for a desired topic.
9+
10+
If you think this is an error and the page should be there, please open an `issue <https://github.com/conan-io/docs/issues>`_ .
11+
12+
.. image:: images/frogarian.png
13+
:width: 240 px
14+
:align: center

conf.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
'sphinx.ext.todo',
3737
'conan',
3838
'sphinxcontrib.spelling',
39+
'notfound.extension',
3940
]
4041

4142
# The short X.Y version.
@@ -392,6 +393,9 @@
392393
linkcheck_timeout = 90
393394
linkcheck_retries = 2
394395

396+
# Not Found
397+
notfound_pagename = 'Page Not Found'
398+
395399

396400
# copy legacy redirects
397401
def copy_legacy_redirects(app, docname): # Sphinx expects two arguments
@@ -449,7 +453,7 @@ def copy_legacy_redirects(app, docname): # Sphinx expects two arguments
449453
</head>
450454
</html>
451455
"""
452-
456+
453457
if app.builder.name == 'html':
454458
for html_src_path, dst_path in redirect_files.items():
455459
target_path = app.outdir + '/' + html_src_path

images/frogarian.png

336 KB
Loading

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sphinx==1.7.9
22
sphinxcontrib-spelling
3+
sphinx-notfound-page
34
elasticsearch>=6.0.0,<7.0.0
45
boto3
56
requests

0 commit comments

Comments
 (0)