Skip to content

Commit

Permalink
Merge pull request #20327 from storybookjs/norbert/gfm-migration
Browse files Browse the repository at this point in the history
Docs: migration documentation for MDX2 in storybook CLI
  • Loading branch information
ndelangen authored Jan 14, 2023
2 parents bf1fc87 + 6528127 commit ef7b7df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 2 additions & 4 deletions code/lib/cli/src/automigrate/fixes/mdx-1-to-2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ export const mdx1to2: Fix<Mdx1to2Options> = {
We've found ${chalk.yellow(storiesMdxFiles.length)} '.stories.mdx' files in your project.
Storybook has upgraded to MDX2 (https://mdxjs.com/blog/v2/), which contains breaking changes from V1.
We can try to automatically upgrade your MDX files to MDX2 format using some common patterns.
For a full guide for how to manually upgrade your files, see the MDX2 migration guide:
${chalk.cyan('https://mdxjs.com/migrating/v2/#update-mdx-files')}
Some steps might require manual intervention. You can find a full guide for how to manually upgrade your files here:
${chalk.cyan('https://storybook.js.org/docs/7.0/react/writing-docs/mdx#breaking-changes')}
`;
},

Expand Down
6 changes: 6 additions & 0 deletions docs/writing-docs/mdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ paths={[

<!-- prettier-ignore-end -->

<div class="aside">

💡 The [`remark-gfm`](https://github.com/remarkjs/remark-gfm) package isn't provided by default during migration. We recommend installing it as a development dependency if you use its features.

</div>

### Automigration

To help you transition to the new version, we've created a migration helper in our CLI. We recommend using it and reaching out to the maintainers using the default communication channels (e.g., [Discord server](https://discord.com/channels/486522875931656193/570426522528382976), [GitHub issues](https://github.com/storybookjs/storybook/issues)) for problems you encounter.
Expand Down

0 comments on commit ef7b7df

Please sign in to comment.