Addon-docs mdx docs disappeared on the menu when using --docs
See original GitHub issueDescribe the bug When I start a project by add --docs, it seems disappeared in left menu I can access this page by typing the url, but can not find it on the left.
Actually, I can see it if I don’t start a docs-only page.
To Reproduce NODE_PATH=src start-storybook -c .storybook -p 6006 --docs
Expected behavior
Show items when use --docs
Code snippets mdxfile
import { Meta, Story, Props, Preview } from '@storybook/addon-docs/blocks';
import { text, object } from '@storybook/addon-knobs';
import getConfig from '../utils/getConfig';
<Meta title="Xtable" component={Live} />
## 代码演示
....
<Preview withToolbar mdxSource={BasicText}>
<Story name="基本例子">
<Basic />
</Story>
</Preview>
## Live Demo
...
<Story name="live-demo" args={config}>
{(args) => {
return <Live {...args} />
}}
</Story>
<Props story="live-demo" />
System: System: OS: macOS Mojave 10.14.5 CPU: (8) x64 Intel® Core™ i7-4771 CPU @ 3.50GHz Binaries: Node: 12.16.1 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm Browsers: Chrome: 81.0.4044.122 Safari: 12.1.1 npmPackages: @storybook/addon-docs: ^6.0.0-alpha.39 => 6.0.0-alpha.41 @storybook/addon-knobs: ^6.0.0-alpha.41 => 6.0.0-alpha.41 @storybook/react: ^6.0.0-alpha.41 => 6.0.0-alpha.41 @storybook/source-loader: ^6.0.0-alpha.41 => 6.0.0-alpha.41
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top GitHub Comments
So the request seems to be seeing stories as nested elements in the sidebar of the
--docs
page?That’s not the common behavior in most design systems I researched, however I could see why folks might want to quickly navigate to the story section.
I don’t think it makes sense to link to every story but perhaps we can auto-generate nested sidebar elements for all
h2
s instead. That’s inline with typical documentation site behavior and is general enough to apply to many cases. (We also dogfood--docs
mode for Storybook Design System)That’s a feature of
--docs
, not a bug