Description
This issue was originally reported by @shripadk via facebook/react/issues/2424
It would be great to have documentation for various versions of React similar to http://nodejs.org/docs/
Netlify already permanently caches deployments so we should be able to use it to link to older versions of the docs at specific times. The new website header also has a UI label for the current version that could easily be turned into a drop-down selector for toggling between past versions.
How would the drop-down menu work?
We could store a list of snapshot deployments (eg 16.0, 16.1, etc) in a JSON or YML config file in GitHub and the latest deployment of the docs site could use it to build the list of links to older versions of the docs.
Older versions of the site could make an HTTP request to load the list dynamically from eg reactjs.org/some/static/path/versions.json. This would enable older versions to be updated with links back to newer versions of the docs.
Why not build and deploy older versions of the docs?
One or two people have asked why not just build old versions of the docs now, with the newer site. My concerns with this would be:
- Gatsby's config and our view templates tie the markdown content and layout together in such a way that changes to either would make building older versions of the docs difficult (eg reorganizing our directory structure would require forking our Gatsby build process).
- It would complicate translation efforts via Crowdin.
- It would probably slow the build process down.