bootstrap
bootstrap copied to clipboard
Better link in documentation to the latest release
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.
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.
Disallowing only works for unindexed content.
It can be requested to remove the unwanted URLs from the index via Google Search console https://search.google.com/search-console/welcome
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.
related; add rel="nofollow"
to the old versions of docs on https://getbootstrap.com/docs/versions/
REF: https://en.wikipedia.org/wiki/Nofollow
Yeah, but I'd rather just block/allow the old versions in one place, robots.txt.
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
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
+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.
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 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.
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
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
but how are those static pages served to the user?
GitHub Pages
Any update on supporting https://getbootstrap.com/docs/latest/
? This will be greatly appreciated. Thanks.
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
what about adding no-index tag to older versions?
A simple workaround is to google the version number as well, e.g., bootstrap 5.3 d-print-none
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.