-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
add 404 page to docs #5057
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
add 404 page to docs #5057
Conversation
You can preview the 404 page from any wrong url with the base corresponding to this PR, for example https://pymc--5057.org.readthedocs.build/en/5057/api/inexistent.html |
Codecov Report
@@ Coverage Diff @@
## main #5057 +/- ##
==========================================
+ Coverage 78.29% 78.40% +0.10%
==========================================
Files 129 130 +1
Lines 24396 24464 +68
==========================================
+ Hits 19102 19182 +80
+ Misses 5294 5282 -12
|
/pre-commit-run |
This is great. I'm wondering if we could also redirect any links to e.g. docs.pymc.io/notebook to docs.pymc.io/en-stable/notebook? This way all our links will continue to work. |
I think we should first try to auto-direct actually, a lot of those links will never be updated (e.g. if they are in a book) and still keeping them working is pretty easy by just redirecting to stable. |
redirecting would be great too, both options should be perfectly compatible with one another, and the 404 page will probably be quite useful with the 4.0 release because there the change won't only be this language plus version extension to the url, most pages will be reorganized or renamed. We will also use sphinx-design in v4 docs which is the pip only dependency that is somehow breaking pre-commit so this is also something that needs to be adressed at some point, why not now to get this page up. I have no idea if this redirection is possible nor how to do it, and I can't look into it either in the near-mid future either. We should probably open an issue for that or even ask for help on twitter. The only comment regarding the redirection is that it should not add |
OK this turned out to be trivial: https://docs.readthedocs.io/en/stable/user-defined-redirects.html should work now. |
|
@Sayam753 @michaelosthege @MarcoGorelli maybe, ideas on how to fix pre-commit? |
@OriolAbril I'm not familiar with |
Can you try using the conda env sorter from https://github.com/MarcoGorelli/madforhooks ? IIRC it handles this - else I'll take a look next week |
The failing pre-commit hooks changed the files in place. So, @OriolAbril to fix them all -
And push? |
I will try that, but the environments and requirement checks are broken or didn't work from the start. I also did some clean-up in #5060 and not only the version requirements were different on different files, but also nbsphinx was listed as requirement in some places but not everywhere. Or it doesn't run in all cases where one of the modified files is changed |
Thanks @OriolAbril! |
This should add a 404 page to the documentation so when users follow a non existing link
within the docs.pymc.io domain they'll go to this page instead of the rtd maze page.
Follows what I did for ArviZ, if you go to a non existing page like https://arviz-devs.github.io/arviz/generated/arviz.plot_autocorr.html
you see a somewhat informative page.