Skip to content

Commit

Permalink
Docs: create nice 404 pages
Browse files Browse the repository at this point in the history
Currently, when a user arrives at a 404 page, Read the Docs shows the default
Maze Found page without context about the setuptools project itself.

This extension, `sphinx-notfound-page`, creates a `404.html` page with the same
style as the rest of the documentation pages that Read the Docs will serve
instead of the default Maze Found one.
  • Loading branch information
humitos committed Jul 13, 2022
1 parent 4d00d50 commit fe6d794
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelog.d/3444.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Installed ``sphinx-notfound-page`` extension to generate nice 404 pages.
-- by :user:`humitos`
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@
extensions += ['sphinx-favicon']
html_static_path = ['images'] # should contain the folder with icons

# Add support for nice Not Found 404 pages
extensions += ['notfound.extension']

# List of dicts with <link> HTML attributes
# static-file points to files in the html_static_path (href is computed)
favicons = [
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ docs =
jaraco.packaging >= 9
rst.linker >= 1.9
jaraco.tidelift >= 1.4
sphinx-notfound-page==0.8.3

# local
pygments-github-lexers==0.0.5
Expand Down

0 comments on commit fe6d794

Please sign in to comment.