nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

Google Search Results lead to docs that never allow you to reach newest/correct docs

Open bnb opened this issue 3 years ago • 6 comments

I just searched for "read file node.js" on Google and got the v6 docs. From there, there's seemingly no way to get to the most recent docs page that actually has correct information about the API currently - you can get up to v9, but you can't get past that.

It would be really helpful if we were able to figure out a way to always allow people to get to the newest version of the docs.

bnb avatar Jul 08 '22 02:07 bnb

Maybe we can detect when someone is viewing a doc for an unsupported version of Node.js and insert a banner at the top telling them that they're looking at the documentation for an old and unsupported version of the Node.js and provide a link to the latest LTS docs or something like that.

Trott avatar Jul 08 '22 03:07 Trott

@bnb could you please share the URL of the page of the v6 doc? Google doesn't give me a link to the v6 when searching the same thing than you.


As an example of what Trott suggested, see the documentation of Symfony displays a warning message if you browse the doc of an unmaintained version: https://symfony.com/doc/4.3/setup/upgrade_major.html

alexislefebvre avatar Jul 11 '22 17:07 alexislefebvre

Maybe we can detect when someone is viewing a doc for an unsupported version of Node.js and insert a banner at the top telling them that they're looking at the documentation for an old and unsupported version of the Node.js and provide a link to the latest LTS docs or something like that.

I'm not sure how easy that will be to do for the existing published docs. Currently the API docs are treated as part of Node.js releases and even the release team are unable to update them once (IIRC) 7 days have passed (basically the assets for a Node.js release are treated as immutable once released).

richardlau avatar Jul 11 '22 17:07 richardlau

@alexislefebvre https://nodejs.org/dist/latest-v6.x/docs/api/fs.html

bnb avatar Jul 11 '22 21:07 bnb

Maybe we can detect when someone is viewing a doc for an unsupported version of Node.js and insert a banner at the top telling them that they're looking at the documentation for an old and unsupported version of the Node.js and provide a link to the latest LTS docs or something like that.

I'm not sure how easy that will be to do for the existing published docs. Currently the API docs are treated as part of Node.js releases and even the release team are unable to update them once (IIRC) 7 days have passed (basically the assets for a Node.js release are treated as immutable once released).

Oh, yeah, I see now that the JavaScript assets are all part of the per-release bundle and not shared.

Trott avatar Jul 12 '22 00:07 Trott

A solution for this was proposed in https://github.com/nodejs/node/pull/36495

nschonni avatar Jul 12 '22 04:07 nschonni

Those outdated docs were removed and a solution on nodejs/node was also done.

ovflowd avatar Mar 12 '23 14:03 ovflowd