diff --git a/addons/docs/README.md b/addons/docs/README.md index 025b85720be8..9e89cc7d1cbf 100644 --- a/addons/docs/README.md +++ b/addons/docs/README.md @@ -154,6 +154,7 @@ module.exports = { configureJSX: true, babelOptions: {}, sourceLoaderOptions: null, + transcludeMarkdown: true, }, }, ], @@ -164,6 +165,16 @@ The `configureJSX` option is useful when you're writing your docs in MDX and you `sourceLoaderOptions` is an object for configuring `@storybook/source-loader`. When set to `null` it tells docs not to run the `source-loader` at all, which can be used as an optimization, or if you're already using `source-loader` in your `main.js`. +The `transcludeMarkdown` option enables mdx files to import `.md` files and render them as a component. +```mdx +import { Meta } from '@storybook/addon-docs/blocks'; +import Changelog from '../CHANGELOG.md'; + + + + +``` + ## Manual configuration We recommend using the preset, which should work out of the box. If you don't want to use the preset, and prefer to configure "the long way" add the following configuration to `.storybook/main.js` (see comments inline for explanation):