-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: set canonical #22716
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
DOC: set canonical #22716
Conversation
Works as expected on CI: https://67489-1385122-gh.circle-artifacts.com/0/doc/build/html/index.html. |
Should we put this behind the same release flag that we use for GA etc? |
We could, but I don't think it means anything for unpublished sites. I guess the dev branch but we still want canonical to point to stable. And if the canonical doesn't exist (new page) then I think google just picks up the real page anyway. |
I'm thinking about distros that want to build the docs for offline use etc. I guess it does little harm, but it is worth trying to be tidy. I'm going to approve this, but leave it to @QuLogic to merge. |
…716-on-v3.5.1-doc Backport PR #22716 on branch v3.5.1-doc (DOC: set canonical)
…716-on-v3.5.x Backport PR #22716 on branch v3.5.x (DOC: set canonical)
PR Summary
This closes matplotlib/matplotlib.github.com#68 going forward, though it doesn't go back and fix 3.5 and 3.5.1
3.5.0 and 3.5.1 do not list the canonical links as
/stable/index.html
(etc) and google has started surfacing/3.5.1/index.html
as the canonical and ignoring/stable/index.html
as a duplicate. We wantstable
to be the canonical, so this adds:<link rel="canonical" href="https://matplotlib.org/stable/index.html" />
toindex.html
or<link rel="canonical" href="https://matplotlib.org/stable/gallery/frontpage/3D.html" />
togallery/frontpage/3D.html
etc.PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).