Skip to content

Commit 4f5c6fe

Browse files
committed
[doc] Disable auto-included addon-docs when adding GFM plugin
This fixes a confusing issue when you try to add the GFM plugin, when using `addon-essentials` (AFAIK, that's the default?): Storybook ignores the new plugin because the `docs` add-on was already included. Changing code order doesn't seem to help, either. I only found the solution after digging through this old issue: #20091 (comment) > **Note:** this should also be fixed for [v7](https://storybook.js.org/docs/7/writing-docs/mdx#anatomy-of-mdx), but I didn't find the correct branch to edit that - the "edit on GitHub" link simply takes me to `next`, where the v7 files don't exist anymore.
1 parent 2dcf9dc commit 4f5c6fe

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/_snippets/storybook-main-config-remark-options.md

+22
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ export default {
77
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
88
addons: [
99
// Other addons go here
10+
11+
// If you have @storybook/addon-essentials enabled, change it to the following:
12+
/*
13+
{
14+
name: "@storybook/addon-essentials",
15+
options: {
16+
docs: false,
17+
},
18+
},
19+
*/
20+
1021
{
1122
name: '@storybook/addon-docs',
1223
options: {
@@ -32,6 +43,17 @@ const config: StorybookConfig = {
3243
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
3344
addons: [
3445
// Other addons go here
46+
47+
// If you have @storybook/addon-essentials enabled, change it to the following:
48+
/*
49+
{
50+
name: "@storybook/addon-essentials",
51+
options: {
52+
docs: false,
53+
},
54+
},
55+
*/
56+
3557
{
3658
name: '@storybook/addon-docs',
3759
options: {

0 commit comments

Comments
 (0)