bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Better link in documentation to the latest release

Open matronator opened this issue 5 years ago • 19 comments

One thing that's been driving me crazy ever since I started using Bootstrap was the fragmenting of documentation across multiple versions on Google. Every time you want to quickly lookup some component or whatever on Google, you get several results of the same page but from a different Bootstrap version and even worse most of the time the latest (stable) one isn't even in the results.

As annoying as this is, I can see the reason in keeping those older docs up in the results, as not everyone is always using the latest version. However what really gets me every time is when I click on the sticky top link in hopes of getting to the same page but on the latest release and end up on the main page instead, having to find the page again in the documentation

I've done it so many times already but it doesn't matter, because the next time I land on an older version of the docs I will forget all about it and end up clicking the link anyways.

What is the reasoning behind it behaving the way it does? It's not very intuitive IMO. The link text doesn't give any indication where exactly you'll be taken, other than it will have something to do with a newer version of (currently) Bootstrap 4 and is kinda misleading that way.

Wouldn't it be more logical for the link to lead to the same page on the newer version, if it exists, otherwise the main page or changelog/release notes? Definitely more convenient at least.

matronator avatar Mar 31 '19 00:03 matronator

This issue has cropped up many times, and I too find it frustrating. If you Google 'Bootstrap 4 docs' 2 of the 3 first results are for v4.0 and v4.1 - and none for the latest v4.3. This leads some users to start using older versions of the docs and probably leads to extra 'support issues' being opened with users using old versions with bugs/features which have since been addressed.

@XhmikosR mentioned in the Slack channel the possibility of blocking Google from indexing the old versions of the docs with robots.txt. I think this would be the best option. So it'd block:

/docs/4.2/
/docs/4.1/
/docs/4.0/
/docs/3.3/

Then if someone searches for 'Bootstrap 3 docs' they'll get the latest v3.4 docs and searching for 'Bootstrap 4 docs' will get the latest v4.3 docs.

coliff avatar Apr 02 '19 08:04 coliff

Disallowing only works for unindexed content.

chrisbo avatar Apr 02 '19 18:04 chrisbo

It can be requested to remove the unwanted URLs from the index via Google Search console https://search.google.com/search-console/welcome

coliff avatar Apr 03 '19 03:04 coliff

Yeah it's my TODO to sort this out.

I need to start from somewhere probably by including the subsitemaps for the docs we want in the root sitemap.

And then block the other versions.

But while at it, I was thinking if maybe having a /latest/ endpoint is a good idea. It has its pros and cons though.

XhmikosR avatar Apr 03 '19 06:04 XhmikosR

related; add rel="nofollow" to the old versions of docs on https://getbootstrap.com/docs/versions/ REF: https://en.wikipedia.org/wiki/Nofollow

coliff avatar Apr 03 '19 07:04 coliff

Yeah, but I'd rather just block/allow the old versions in one place, robots.txt.

XhmikosR avatar Apr 03 '19 07:04 XhmikosR

The best way deindex the older versions this would be adding a <link rel="canonical" /> to the <head> in each page. This will make Google redirect all older indexes for each page to the latest version, which will also help with SEO.

If you block them using robots.txt Google will not remove or update the existing listings, it will just never visit those pages again. More info: https://support.google.com/webmasters/answer/139066?hl=en

cbirdsong avatar Aug 12 '19 14:08 cbirdsong

Best not to de-(search engine index) old versions' documentation as some people still use them.

"rel=canonical" isn't the right approach either - its for identical pages with several url's.

Sitemaps have a 'priority' attribute, but its not clear if Google use it.

A simpler way might be to change the old url's

  • the old urls will return 404
  • this will break any incoming links, and so lower their search engine ranking even when google re-indexes them
  • a longer url will count against them
  • put <a href="..." rel="nofollow"> when linking to the old version (again, to reduce the number of links to them)

e.g.

getbootstrap.com/docs/ - [current version] getbootstrap.com/archive/docs/3.4.1/ - old versions

aavmurphy avatar Aug 25 '19 23:08 aavmurphy

+1 This is really annoying but could be fixed fairly easily with canonical links.

@aavmurphy: Canonical links are for identical content with different URLs, and this is clearly the case with this versioned documentation.

A good example is the Symfony documentation. Try googling symfony + whatever (e.g. symfony controller) and you will always find the documentation of the current version ...com/doc/current/*. If you choose an older version you will find a canonical link pointing to the latest documentation: <link rel="canonical" href="https://symfony.com/doc/current/controller.html" /> I don't see any no-follow attributes nor priorities regarding "current" in the sitemap.xml

Would be awesome to have the same feature for our beloved Bootstrap Documentation.

ohmycode avatar Mar 05 '20 16:03 ohmycode

Having a /latest endpoint is what I have suggested too, but I haven't got the time to look into the details. Because we'd need to generate the docs twice and make sure our deployment scripts are adapted for this.

This, unfortunately, will require us to go into the old docs and adapt the canonical links, but I guess it's something we can avoid. So as long as this will solve the issue once and for, I'm all for it

That being said, if anyone has any patches, feel free to CC me.

XhmikosR avatar Mar 05 '20 16:03 XhmikosR

@XhmikosR I don't know what server technology is used to deliver this pages, but a quick fix could be parsing the HTML output and adding the canonical link tag on the fly.

Removing the older docs from the google index or excluding them via robots.txt isn't a good option IMO, because that would mean throwing away their ranking.

ohmycode avatar Mar 06 '20 09:03 ohmycode

These are static pages so we need to edit them. Plus we already have a canonical link for all pages; I did this last year, not a fun process for sure :P

Removing the older docs from the google index or excluding them via robots.txt isn't a good option IMO, because that would mean throwing away their ranking.

Yeah, and also people won't be able to search for specific versions. Although, we do have search since v4.0.0

XhmikosR avatar Mar 18 '20 14:03 XhmikosR

but how are those static pages served to the user? if it's for example apache you could use mod_substitute to rewrite them automatically modifying the response HTML:

AddOutputFilterByType SUBSTITUTE text/html
Substitute s/<link rel="canonical" href="https:\/\/getbootstrap\.com\/docs\/[^\/]*/<link rel="canonical" href="https://getbootstrap.com/docs/latest/ni

ohmycode avatar Mar 18 '20 22:03 ohmycode

but how are those static pages served to the user?

GitHub Pages

XhmikosR avatar Mar 19 '20 06:03 XhmikosR

Any update on supporting https://getbootstrap.com/docs/latest/? This will be greatly appreciated. Thanks.

PanderMusubi avatar Nov 12 '21 09:11 PanderMusubi

Agree, a /latest/ link is very much needed! It's so frustrating when every link you click always brings to so some random old version documentation! 😡 If there were a /latest/ link, at least I could use my Redirector extension to rewrite https://getbootstrap.com/docs/*/getting-started/introduction/ to https://getbootstrap.com/docs/latest/getting-started/introduction/. Even with the occasional dead link that would produce, it would be a better solution than the chaos today.

cc: @XhmikosR

danielniccoli avatar Sep 23 '23 08:09 danielniccoli

what about adding no-index tag to older versions?

alirezadigi avatar Dec 20 '23 09:12 alirezadigi

A simple workaround is to google the version number as well, e.g., bootstrap 5.3 d-print-none

aavmurphy avatar Feb 13 '24 13:02 aavmurphy

Or fix the url in the "Click here for newer version".

Because its taking 5 years, here is a suggestion: replace version number in url.

bcheung4589 avatar Apr 30 '24 08:04 bcheung4589