Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Dec 30, 2024

Right now if you typo a PEP (e.g. https://peps.python.org/pep-123456) you get the default GitHub Pages 404 page:

image

This is an attempt to use a nicer one using our own Sphinx theme:

image

I have this on my fork right now: https://hugovk.github.io/peps/pep-123456

The one difference is I have notfound_urls_prefix = "/peps/" in conf.py because it's using the github.io domain and a peps/ subdir. See:

https://sphinx-notfound-page.readthedocs.io/en/latest/faq.html#does-this-extension-work-with-github-pages

We'll probably need to merge this to see if it works properly.


📚 Documentation preview 📚: https://pep-previews--4184.org.readthedocs.build/

@hugovk hugovk added the infra Core infrastructure for building and rendering PEPs label Dec 30, 2024
@StanFromIreland
Copy link
Member

docs.python.org needs one too but I'm unsure how to implement it. The package sphinx-notfound-page is broken so I guess we just create a simple html page that can be added to the nginx conf.

@hugovk
Copy link
Member Author

hugovk commented Dec 30, 2024

docs.python.org needs one too but I'm unsure how to implement it. The package sphinx-notfound-page is broken so I guess we just create a simple html page that can be added to the nginx conf.

Let's continue that in python/cpython#125895

Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember we initially had problems with a custom 404 page due to redirects to PEP 404, but this is now done proxy-side with the TF config, so hopefully there won't be problems now.

A

@hugovk hugovk merged commit 0a3e52c into python:main Dec 31, 2024
5 checks passed
@hugovk hugovk deleted the sphinx-notfound-page branch December 31, 2024 09:58
@hugovk
Copy link
Member Author

hugovk commented Dec 31, 2024

There we go :)

https://peps.python.org/pep-123456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra Core infrastructure for building and rendering PEPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants