Skip to content

Commit

Permalink
Add 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 30, 2024
1 parent a5dde48 commit d95a11d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ jobs:
python -m pip install --upgrade pip
- name: Render PEPs
run: make dirhtml JOBS=$(nproc)
run: |
make dirhtml JOBS=$(nproc)
mv build/404/index.html build/404.html
# remove the .doctrees folder when building for deployment as it takes two thirds of disk space
- name: Clean up files
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

# For tests
pytest
Expand Down

0 comments on commit d95a11d

Please sign in to comment.