Documenter.jl icon indicating copy to clipboard operation
Documenter.jl copied to clipboard

Switching versions resets to the default page

Open g-adel opened this issue 1 year ago • 3 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.

g-adel avatar Mar 09 '24 13:03 g-adel

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.

mortenpi avatar Mar 10 '24 07:03 mortenpi

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)

g-adel avatar Mar 10 '24 10:03 g-adel

With https://github.com/JuliaDocs/Documenter.jl/issues/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

fredrikekre avatar Mar 10 '24 12:03 fredrikekre

Closing in favor of #2799.

mortenpi avatar Nov 03 '25 18:11 mortenpi