Reposting from thread Where to flag (small) problems in User Guide? - #5 by mcol where the discussion derailed a bit from the original topic. The main question is whether we should have docs/latest
or similar as an alias to docs for latest version.
The discussion started with this observation by @Max_Mantei and with @Bob_Carpenter asking for suggestions on behalf of @mitzimorris
This provoked some discussion on whether we should change how we serve the docs to improve indexing.
Disclaimer: My understanding of SEO is superficial from running several hobby/non-profit sites, I may easily be wrong about stuff.
Some points to recap from the original discussion + my commentary:
@mitzimorris noted that
we have âunversionedâ links, e.g.: âhttps://mc-stan.org/docs/stan-users-guide/index.html â
this redirects to latest by virtue of a script which rewrites the redirects every time we do a release.
I see two potential reasons why this proves insufficient:
- Since people are redirected, they copy-paste the target (versioned) link when sharing on the web. So all/most of the links found around the web are to a specific version.
- My understanding is that Google will follow the redirects and index the target of the redirect (counting all âunversionedâ links as links to a specific version). This means that even if the Google robot enters the docs via an unversioned link, it will see all further links as versioned. Also, speculatively, even if everybody used the âunversionedâ links, those would count as links to older versions until the sources/the links themselves are reindexed which may take time.
As an alternative, we could use an alias, i.e. that today, under docs/latest
, there would be the same content as under docs/2_21
, except that all links within documentation would also link to docs/latest
, while all links under docs/2_21
would keep pointing to docs/2_21
. (if all our links within documentation are relative, this could be achieved via a single Alias
directive in Apache configuration).
This can improve search results in exchange for a risk of breaking links as the docs are updated⌠Additionally, people would need to take care to share version-specifc links when this is necessary, while now care is needed to share a link to the latest content.
@mitzimorris further noted that
Google suggests âcanonical linksâ - would this work?
How to Specify a Canonical with rel="canonical" and Other Methods | Google Search Central | Documentation | Google for Developers
Which I donât think is a right abstraction - docs/latest
is semantically different from docs/2_21
as the latter is considered to be final and unchanging while the former should update and it would not therefore be useful to tell Google to treat them (temporarily) as the same page.
Final note from @mitzimorris:
perhaps itâs a third order detail, but a distinct URL for âlatestâ would lose having the version in the URL. by contrast, in Boost, clicking on the âtake me to latest linkâ brings me to a versioned URL - e.g. - search âboost regexâ shows 1_66 -
âhttps://www.boost.org/doc/libs/1_66_0/libs/regex/doc/html/index.htmlâ
clicking on the âtake me to latestâ links takes me to:
âhttps://www.boost.org/doc/libs/1_71_0/libs/regex/doc/html/index.htmlâ
It is true that we will lose the version from most URL and there is a tradeoff. When I read an old blogpost that links to our docs, do I want to actually see the latest or the then-latest version? (hard to say IMHO). And do we care about latest docs being high in google results?
In the wild, Iâve seen both approaches, for example Elm, has latest
as an alias. For example: elm-geometry 4.0.0 Version appears in the URL only after you explicitly click a specific version. Googling for âelm geometryâ shows me the latest
link on top, which brings me to version 3.1.0, even though it has been released just a few days ago. The Google result actually has wrong title (says its version 3.0.0), so the page was not reindexed since 3.1.0 release.
As Mitzi notes, boost doesnât do this, they have release
as a redirect to 1.71 (as of this writing) and when I search âboost regexâ the top link is for the 1.66 version.
Also related, @nhuurre noted that
When I look at Stan Reference Manual page I donât see any indication that itâs old. The Overview page says version 2.18 but doesnât tell how recent that is or where to find the other versions. Shouldnât the old docs link to the latest version?
And @mitzimorris let us know this is being worked on: bookdown header for old version of docs should have links to latest. ¡ Issue #106 ¡ stan-dev/docs ¡ GitHub and this is how it looks like:
Which I think is great for both redirect/alias approaches!