Skip to content

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

Merged
merged 1 commit into from
Mar 29, 2022
Merged

DOC: set canonical #22716

merged 1 commit into from
Mar 29, 2022

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Mar 28, 2022

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 want stable to be the canonical, so this adds:

<link rel="canonical" href="https://matplotlib.org/stable/index.html" /> to index.html or
<link rel="canonical" href="https://matplotlib.org/stable/gallery/frontpage/3D.html" /> to gallery/frontpage/3D.html etc.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@jklymak jklymak added the Documentation: website layout/behavior/styling changes label Mar 28, 2022
@jklymak jklymak added this to the v3.5.2 milestone Mar 28, 2022
@jklymak jklymak added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Mar 28, 2022
@jklymak
Copy link
Member Author

jklymak commented Mar 28, 2022

@jklymak jklymak requested a review from QuLogic March 28, 2022 11:10
@tacaswell
Copy link
Member

Should we put this behind the same release flag that we use for GA etc?

@jklymak
Copy link
Member Author

jklymak commented Mar 28, 2022

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.

@tacaswell
Copy link
Member

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.

@tacaswell tacaswell modified the milestones: v3.5.2, v3.5-doc Mar 28, 2022
@QuLogic QuLogic merged commit 5bfeaf7 into matplotlib:main Mar 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 29, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 29, 2022
oscargus added a commit that referenced this pull request Mar 29, 2022
…716-on-v3.5.1-doc

Backport PR #22716 on branch v3.5.1-doc (DOC: set canonical)
oscargus added a commit that referenced this pull request Mar 29, 2022
…716-on-v3.5.x

Backport PR #22716 on branch v3.5.x (DOC: set canonical)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: website layout/behavior/styling changes Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No canonical links 3.5.0 and 3.5.1
3 participants