Skip to content
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

root pages should redirect to versioned pages #35

Closed
jklymak opened this issue Mar 1, 2019 · 4 comments · Fixed by #48 or #49
Closed

root pages should redirect to versioned pages #35

jklymak opened this issue Mar 1, 2019 · 4 comments · Fixed by #48 or #49

Comments

@jklymak
Copy link
Member

jklymak commented Mar 1, 2019

matplotlib.org should redirect to matplotlib.org/latest/, which should redirect to matplotlib.org/3.0.2/ or whatever "latest" is. Then people making links can link the versions link and it won't die if we rearrange doc pages (and it will clearly say what the link is).

The proper way to do this would be with an .htaccess file, but GitHub pages doesn't support that.

So far, looks like we can't do this with soft links.

We could do with http-equiv redirect. But that has to be in the header of each file which kind of means having two versions of the docs lying around doing the same thing, but with one version pointing to the canonical version. https://www.w3.org/TR/WCAG20-TECHS/H76.html

Another option is to migrate to readthedocs https://readthedocs.org

@jklymak
Copy link
Member Author

jklymak commented Mar 2, 2019

Soft links definitely do not work - I tested on GitHub pages, and the GitHub pages are transparent to the soft links.

@Carreau
Copy link

Carreau commented Aug 9, 2019

I would avoid the redirect; people tend to copy-past link in SO and GitHub, it's usually better to even redirect the other way, or at least have the rel=canonical point to /latest/ this push google to better index latest.

Though I agree that a /latest/ and/or /stable/ prefix would be nice.

@jklymak jklymak linked a pull request Jan 19, 2021 that will close this issue
1 task
@jklymak
Copy link
Member Author

jklymak commented Jan 21, 2021

I'll re-open because we still haven't done the redirect

@jklymak jklymak reopened this Jan 21, 2021
@jklymak
Copy link
Member Author

jklymak commented Jan 26, 2021

We now have /stable/ redirecting to /3.3.3/ which is good. However, "canonical" is listed as 3.3.3. Suggest instead that "canonical" be /stable/. This will require post-processing the html files upon release, but it is easy to write a python script to do that.

For reference, google will suggest the canonical link, but we are really confusing it by having 3.3.3 be canonical and 3.3.2 also canonical. So what happens is the version of the docs that was referenced the most ends up the top search.

@jklymak jklymak linked a pull request Feb 1, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants