Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes matplotlib/matplotlib#15213,
i.e. a search for something like "matplotlib rcparams" would lead to https://matplotlib.org/users/customizing.html, which is an abandonned version of the current https://matplotlib.org/tutorials/introductory/customizing.html
Also tackles #39 (comment) by @Carreau (who has already added canonical links to a huge bunch of files in an automated way).
This PR only touches the
users/
folder. That folder contains content from the current docs, as well as totally old stuff from the mpl 1.5 docs. It is hence particularly hard to handle it in an automated way.Here the following is done:
Since this folder is not versionned, it's best to redirect all old html files to the canonical version of the current docs. Also, a canonical link is added. E.g. for
users/annotations.html
But for example
users/style_changes.html
redirect tousers/dflt_style_changes.html
, there are other special cases as well.images and .py files are deleted if they are not part of the current docs any more. This might break very rare cases where someone directly linked to an image in the users folder, but I think one needs to make a cut at some point. Also the respective current docs often overwrite older images from the whats_new section anyways. The old files are still in the versionned folders, e.g.
2.0.2/users/...
, in case they are desperately needed.I expect the
users/
folder to take a large portion of page hits to outdated files, but it would be nice to verify via some analytics, c.f. #23 (comment), @tacaswell.