question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Addon-docs mdx docs disappeared on the menu when using --docs

See original GitHub issue

Describe the bug When I start a project by add --docs, it seems disappeared in left menu image 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
domyencommented, Aug 3, 2020

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 h2s 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)

1reaction
shilmancommented, Apr 23, 2020

That’s a feature of --docs, not a bug

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup CSF + MDX stories with @storybook/addon-docs - GitLab
Figure out a way to preserve essential features with the new setup (usage examples mostly). Document ways for migrating current stories to the ......
Read more >
storybook/addon-docs - npm
DocsPage is a zero-config aggregation of your component stories, text descriptions, docgen comments, props tables, and code examples into clean, ...
Read more >
Troubleshooting Common Errors - Gatsby
Problems with the cache; Errors with common plugin configurations. Installing plugins for styling results in Generating SSR bundle failed; Issues with fs ...
Read more >
menu missing in google docs. need it back
For me, the menu came back by using control-shift-F while in an open document.
Read more >
Advanced Features: Using MDX - Next.js
Internally MDX uses remark and rehype. Remark is a markdown processor powered by a plugins ecosystem. This plugin ecosystem lets you parse code,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found