JuliaDocs / Documenter.jl

A documentation generator for Julia.

Home Page:https://documenter.juliadocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switching versions resets to the default page

j-adel opened this issue · comments

When searching for something in a package, Google usually points to an outdated version. Normally, this wouldn't be an issue since you can switch to the latest version on the bottom left. The only issue is that doing so directs me to the home page of the documentation instead of sending me to the same page in the new version. I understand that sometimes the page is no longer there but I think at least attempting the redirect to the new version's page and if it fails would send the user to the homepage.

I thought we already have an issue for this, but I couldn't find it.

I understand that sometimes the page is no longer there but I think at least attempting the redirect to the new version's page which if fails would send the user to the homepage.

Yea, that's the main issue here. But, before redirecting, we could probably do a fetch to the presumed exact URL, see if the page is there, and if it is not, then navigate to the root.

Google usually points to an outdated version

Just as a note: this should not really be true for the most part. Documenter should show a banner on an outdated version, which also also sets noindex tags, and it also sets up canonical URLs:

image

What might be happening is that the old documentation is very old (predates the banner etc). In that case, the maintainers should add the banner with DocumenterTools.

Yes, I think this is a case of older versions of a package using older versions of Documenter.jl, and maintainers forget to update it. I can submit an issue of this when I see it in other packages. Is there a guide somewhere that I can direct the developers to when submitting an issue? (I suppose I could also try a PR myself)

With #1411 it would be possible to redirect blindly amd have the 404 inte page mention that "maybe this page don't exist for this version" as a probabe cause or something