Search engines return old library versions

This is a small but very annoying problem I face everyday when looking up documentation:

All search engines return various versions of the documentation, but very rarely the latest which I guess is what most people want (currently 1.15.6).

I’m not sure how this can be fixed… maybe using a global cannonical instead of per minor version?

<link rel="canonical" href="https://hexdocs.pm/elixir/latest/Kernel.html" />

Here’s the snippet for v1.5.6

<link rel="canonical" href="https://hexdocs.pm/elixir/1.15/Kernel.html" />

Would this work? Any other ideas?

9 Likes

Thank you. Next Elixir minor version (v1.16) will always point to the latest Elixir as canonical.

8 Likes

Is this something implemented in ex_doc/hexdocs that other packages will be able to benefit from as well? Is there a configuration that needs to be set?

1 Like

I believe packages always point to latest. Elixir explicitly opted in per minor version.

1 Like