-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
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 |
There was a problem hiding this 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
Co-authored-by: Adam Turner <[email protected]>
There we go :) |
Right now if you typo a PEP (e.g. https://peps.python.org/pep-123456) you get the default GitHub Pages 404 page:
This is an attempt to use a nicer one using our own Sphinx theme:
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/"
inconf.py
because it's using the github.io domain and apeps/
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/