Skip to content

Mark stale docs at top-level with warning banner #25

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

Closed
wants to merge 2 commits into from

Conversation

JazzTap
Copy link

@JazzTap JazzTap commented Jul 17, 2018

Here's another horrifying (but orthogonal) script-generated commit, building upon 'cleanup.py' (-> 'cleanup.ipynb'). It deprecates any HTML in the following folders which doesn't appear in the (given, in this case '2.2.2') current release.

'gallery', 'examples', 'mpl_examples', 'plot_directive', 'devel', 'users', 'api', 'faq', 'glossary'

'Deprecation' means putting a sticky red banner in, with a suggested search string. Bots are not forwarded (via rel='canonical') because we don't know where the content went. Even if the page has obviously just been refiled (e.g. tight layout guide), we punt to the search engine to do the fuzzy match.

Stale .py or .pdf (but not .png, e.g. in _images) files found in top-level (unversioned) docs are removed. This does break outdated examples' 'Source code' links. (Also, we could check HTML title elements for the outdated version string.)

Edit: Oops, rerunning the script not only stacks 'unreleased-message' banners but is its main use case, fixing tomorrow. Will alias the style ('stale-docs-message') too.

@jklymak jklymak mentioned this pull request Feb 3, 2021
@QuLogic QuLogic closed this in #49 Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant