-
It looks like the NodeJS documentation is published at two URLs for each version, for example: Are the same docs but just under two different URLs. Some of the links from the Is one of these paths considered canonical? any particular reason that they're published under two URLs like this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
/cc @nodejs/nodejs-website |
Beta Was this translation helpful? Give feedback.
-
The answer to this is history, and someone's welcome to try and pull the trigger to break stuff and make only one way to do things. Also because of history (another tangential story to this one), there's another way to get the same docs: https://nodejs.org/download/release/latest-v17.x/docs/api/ and also if you replace /docs/ was meant to be a shortcut to get the latest docs. The /docs/version/ thing was introduced some time later I think when the support to switch between versions in the docs was introduced. These could all be hard redirects to some canonical form, but there's always been a reluctance to break old workflows and just introduce new ones that may be "better" (I've been very guilty of this approach myself with a lot of these paths! like /dist/ vs /download/). Adding hard redirects in /dist/ (or /download/, the canonical form since io.js) has not been something that we've done, I don't think we do it today, it's not nice if you're presenting a raw download folder and people get bounced around. In practice, there should only be one copy of these files, the urls are all just effectively aliases. Although I don't know how the new website works but I assume it's still the same with these files. Is that a problem? Is there something to solve here? Maybe someone should just list the canonical forms of these things in some official place, rules something like this:
|
Beta Was this translation helpful? Give feedback.
The answer to this is history, and someone's welcome to try and pull the trigger to break stuff and make only one way to do things. Also because of history (another tangential story to this one), there's another way to get the same docs: https://nodejs.org/download/release/latest-v17.x/docs/api/ and also if you replace
latest-v17.x
withv17.9.1
you get exactly the same docs again. So that's 6 I can come up with so far!/docs/ was meant to be a shortcut to get the latest docs. The /docs/version/ thing was introduced some time later I think when the support to switch between versions in the docs was introduced.
These could all be hard redirects to some canonical form, but there's always bee…