-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDX linkings should not rely on the remark-slug plugin to generate slug for headers #9329
Labels
Comments
3 tasks
Looks like we already have a set of components like in storybook/addons/docs/src/blocks/mdx.tsx Lines 185 to 202 in da303c5
So now we need to slugify the text content into id ? Since the content is evaluated in run time, how should it suppose to do that 🤔?
|
3 tasks
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if this is still relevant in SB 7.x. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The current version of MDX linkings rely on the remark-slug plugin to generate the slugs for headers:
There is a few issues with this approach:
The following dynamic expression
## <Fragment children={props.title} />
result in the following slug:Describe the solution you'd like
SB should develop a set of
<Header />
components that will take care of rendering the header element and generate the appropriate slug.These components could be used for DocsPage and also as custom MDX components for MDX linkings.
The text was updated successfully, but these errors were encountered: