Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra: Add nicer 404 page #4184

Merged
merged 4 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions peps/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# Add any Sphinx extension module names here, as strings.
extensions = [
"notfound.extension",
"pep_sphinx_extensions",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
Expand Down Expand Up @@ -85,6 +86,10 @@
"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"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading