Infra: Add nicer 404 page (#4184)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Hugo van Kemenade 2024-12-31 11:58:05 +02:00 committed by GitHub
parent fc00ce6857
commit 0a3e52c75b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,7 @@ htmllive: _ensure-sphinx-autobuild html
.PHONY: dirhtml
dirhtml: BUILDER = dirhtml
dirhtml: html
mv $(BUILDDIR)/404/index.html $(BUILDDIR)/404.html
## linkcheck to check validity of links within PEP sources
.PHONY: linkcheck

View File

@ -19,6 +19,7 @@ master_doc = "contents"
# Add any Sphinx extension module names here, as strings.
extensions = [
"notfound.extension",
"pep_sphinx_extensions",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
@ -85,6 +86,10 @@ extlinks = {
"pypi": ("https://pypi.org/project/%s/", "%s"),
}
# sphinx-notfound-page
# https://sphinx-notfound-page.readthedocs.io/en/latest/faq.html#does-this-extension-work-with-github-pages
notfound_urls_prefix = None
# -- Options for HTML output -------------------------------------------------
_PSE_PATH = _ROOT / "pep_sphinx_extensions"

View File

@ -4,6 +4,7 @@ Pygments >= 2.9.0
# See https://github.com/sphinx-doc/sphinx/pull/11100
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1, < 8.1.0
docutils >= 0.19.0
sphinx-notfound-page >= 1.0.2
# For tests
pytest