You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple of pages that were rename as part of the documentation overhaul that need to either have symlinks or forwards put in their place. We don't have direct access to the server so I don't think we can get it return 301s .
The current state is likely better than people getting 404s.
Once we know what files are the problem and the scope of it what do we want to do about it? Do we just want to add symlinks to the moved pages (forever?)? Is there a way to do forwards via html (forever)? Do we want to re-generate all of the old-docs with a header warning it is outdated? Is there a way we can do that without regenerating all of the html (sed? js tricks?)? We are limited in that we host on githubpages so we can only post static files (no server side tuning).
We probably should cross-reference the file list against the google-analytics on each page's usage to make sure we do not break everything.
The output of diff -rq 2.0.2 2.1.0 in a checkout of matplotlib.github.com is too long to post (the limit is 65536 characters). This + a bit of sed filtering will give the files that should be indexed against the GA data, ex diff -rq 2.0.2 2.1.0 | grep 'Only in 2.0.2' | sed 's|Only in 2.0.2||' | sed 's|: |/|'
With a <meta refresh> in the <head>, but that's not as nice as a 302 Permanent redirect. Also not sure if search engines will notice this and start going to the new page. If we're rewriting pages though, we could add the "canonical link" at the same time which I do know that search engines understand.
The problem is not the current docs per-se, but the fact that the whole examples/ directory is still in the root tree and not being overwritten by the new docs. https://matplotlib.org/examples/ has not been updated for years, but is still in our top-level public hierarchy and has absolutely no indication that it is obsolete. I did try matplotlib/matplotlib.github.com#30 but it wasn't ever merged.
I think we should actually just redirect top-level examples/ to gallery/ and allow anything that was in examples that doesn't have the same entry in gallery to 404.
At this point 404s are better than pointing to examples that likely do things in old ways that have improved, or worse do things using deprecated/removed APIs. It's the internet, links die. Let's just make sure our current docs don't somehow accidentally link there.
I'll also add that we're not doing this willy nilly, but in the name of improving the overall situation for users. Having a top-level link like that be out-of-date is really confusing and a serious UX issue, let alone contributing to the issue of "matplotlib docs are hard to understand".
Still may be worth getting rid of all top-level stuff in favor of a /latest link.
Otherwise we'll have to clean out top-level with every release to prevent future outdated top-level pages. And if /latest/xyz does not exist, it may be easier from that to look for /3.0.0/xyz compared to if /xyz does not exist.
Canonical links and redirects were added in matplotlib/matplotlib.github.com#49. There is also a banner noting that the page is outdated at the top of the page.
Activity
tacaswell commentedon Oct 24, 2017
This came up on gitter yesterday https://gitter.im/matplotlib/matplotlib?at=59ee111df7299e8f53218190
There are a couple of pages that were rename as part of the documentation overhaul that need to either have symlinks or forwards put in their place. We don't have direct access to the server so I don't think we can get it return 301s .
The current state is likely better than people getting 404s.
malgamves commentedon Oct 28, 2017
What do i do?
tacaswell commentedon Oct 29, 2017
Fun fact: github has a maximum comment length!
I am not sure of the best course of action here is. I think the first step is to sort out what files moved, see #8688 and to simply compare the contents of https://github.com/matplotlib/matplotlib.github.com/tree/master/2.0.2 and https://github.com/matplotlib/matplotlib.github.com/tree/master/2.1.0
Once we know what files are the problem and the scope of it what do we want to do about it? Do we just want to add symlinks to the moved pages (forever?)? Is there a way to do forwards via html (forever)? Do we want to re-generate all of the old-docs with a header warning it is outdated? Is there a way we can do that without regenerating all of the html (sed? js tricks?)? We are limited in that we host on githubpages so we can only post static files (no server side tuning).
We probably should cross-reference the file list against the google-analytics on each page's usage to make sure we do not break everything.
matplotlib/matplotlib.github.com#23 is a ham-fisted attempt to remove old files.
Below is logs of various outputs. I have done some of the leg work, but there is still a bunch of analysis to do.
tacaswell commentedon Oct 29, 2017
Analytics
Details
tacaswell commentedon Oct 29, 2017
Renames according to git
Details
tacaswell commentedon Oct 29, 2017
The output of
diff -rq 2.0.2 2.1.0in a checkout ofmatplotlib.github.comis too long to post (the limit is 65536 characters). This + a bit of sed filtering will give the files that should be indexed against the GA data, exdiff -rq 2.0.2 2.1.0 | grep 'Only in 2.0.2' | sed 's|Only in 2.0.2||' | sed 's|: |/|'tacaswell commentedon Oct 29, 2017
GA landing page data
Details
QuLogic commentedon Oct 29, 2017
With a
<meta refresh>in the<head>, but that's not as nice as a 302 Permanent redirect. Also not sure if search engines will notice this and start going to the new page. If we're rewriting pages though, we could add the "canonical link" at the same time which I do know that search engines understand.jni commentedon Aug 16, 2020
For what it's worth @tacaswell
I don't think that is true anymore — some of those old pages are downright misleading for modern users.
3 remaining items
jklymak commentedon Aug 17, 2020
The problem is not the current docs per-se, but the fact that the whole
examples/directory is still in the root tree and not being overwritten by the new docs. https://matplotlib.org/examples/ has not been updated for years, but is still in our top-level public hierarchy and has absolutely no indication that it is obsolete. I did try matplotlib/matplotlib.github.com#30 but it wasn't ever merged.I think we should actually just redirect top-level
examples/togallery/and allow anything that was inexamplesthat doesn't have the same entry ingalleryto 404.dopplershift commentedon Aug 18, 2020
At this point 404s are better than pointing to examples that likely do things in old ways that have improved, or worse do things using deprecated/removed APIs. It's the internet, links die. Let's just make sure our current docs don't somehow accidentally link there.
dopplershift commentedon Aug 18, 2020
I'll also add that we're not doing this willy nilly, but in the name of improving the overall situation for users. Having a top-level link like that be out-of-date is really confusing and a serious UX issue, let alone contributing to the issue of "matplotlib docs are hard to understand".
timhoffm commentedon Aug 18, 2020
Still may be worth getting rid of all top-level stuff in favor of a /latest link.
Otherwise we'll have to clean out top-level with every release to prevent future outdated top-level pages. And if /latest/xyz does not exist, it may be easier from that to look for /3.0.0/xyz compared to if /xyz does not exist.
QuLogic commentedon Feb 12, 2021
Canonical links and redirects were added in matplotlib/matplotlib.github.com#49. There is also a banner noting that the page is outdated at the top of the page.