Skip to content

Instantly share code, notes, and snippets.

@shilman
Created June 25, 2017 23:20
Show Gist options
  • Save shilman/6de9d40d9c8fb33d301060b8601b8c36 to your computer and use it in GitHub Desktop.
Save shilman/6de9d40d9c8fb33d301060b8601b8c36 to your computer and use it in GitHub Desktop.
Versioned Docs

Versioned Documentation for Storybook

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

Proposal

Patterned off of Meteor docs site (source)

  1. 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
  2. A naming convention on release branches release/X.y
  3. A CI setup that:
    • deploys the branch to /vX.y/ if the change is to a release/X.y branch
    • deploys to / if it's on master
  4. Code that displays a warning banner if the user is not viewing the current stable version
@smooJitter
Copy link

You all are moving fast. It would be nice (on the readme.md at statement about upgrading. I have had a fair share of problems with configuring and installing storybook. Now that I have it working. I am afraid to upgrade the cli. Fortunately, Im only using storybook on a ui test app. I found it easier reinstall storybook, start a new project, then copy over the stories. It looks like you are posting new releases ever few days. The version I have works fine. I'd like to keep up with the changes. After more than a year, I've finally gotten storybook to work for me. THANKS!

@shilman
Copy link
Author

shilman commented Jun 29, 2017

@tmeasday I don't think the pointer to the latest documentation is a problem?

  • latest version resides at both / and at /vX.y (not google-indexed)
  • all versions at /vX.y point to latest at /

Re: Gatsby, I think @ndelangen is in the process of converting us to NextJS.

@shilman
Copy link
Author

shilman commented Jun 29, 2017

@smooJitter most of the releases we're doing are just minor bugfixes, and we're trying to limit breaking changes to 1-2x / year with major releases (3.0.0, 4.0.0, etc.). AFAIK we have documented all necessary migrations in MIGRATION.md. But we'll try to do a better job of documenting it all. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment