Goals:
- Docs for the latest stable release of Storybook, statically hosted at https://storybook.js.org
- Docs for a preview release, clearly labeled as
preview
with disclaimers and pointers to the main docs - Docs for previous minor releases of Storybook, with disclaimers and pointers to the main docs
Patterned off of Meteor docs site (source)
- A config file (
package.json
?) that lists out the versions, and also the current stable version- Code that reads this in and creates a drop-down
- A naming convention on release branches
release/X.y
- A CI setup that:
- deploys the branch to
/vX.y/
if the change is to arelease/X.y
branch - deploys to
/
if it's onmaster
- deploys the branch to
- Code that displays a warning banner if the user is not viewing the current stable version
The biggest downside of this approach is that the old versions don't have links to all the new versions, unless you update all branches on release (like this commit I suspect they have a script to do this).
Happy to help do this, considering I was the one that set it up for Meteor. The only bit I'm not sure about is step 1--for the Hexo docs that info is in the config file for Hexo (see commit linked above). @shilman you'd have the best idea of how to do it for Gatsby.