From fe6d794adea937f08146084495d0721a375d8ce7 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 11 Jul 2022 18:32:50 +0200 Subject: [PATCH] Docs: create nice 404 pages 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. --- changelog.d/3444.doc.rst | 2 ++ docs/conf.py | 3 +++ setup.cfg | 1 + 3 files changed, 6 insertions(+) create mode 100644 changelog.d/3444.doc.rst diff --git a/changelog.d/3444.doc.rst b/changelog.d/3444.doc.rst new file mode 100644 index 0000000000..fd6bda8570 --- /dev/null +++ b/changelog.d/3444.doc.rst @@ -0,0 +1,2 @@ +Installed ``sphinx-notfound-page`` extension to generate nice 404 pages. +-- by :user:`humitos` diff --git a/docs/conf.py b/docs/conf.py index b7d05382da..3fedbbc422 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 HTML attributes # static-file points to files in the html_static_path (href is computed) favicons = [ diff --git a/setup.cfg b/setup.cfg index 65c87768b6..8ecfae20bd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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