-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[addon-docs] Linking to sections. #8184
Comments
I'm not sure! MDX support is still early and we might need to add this in 5.3! 😅 |
It's possible to do something like this:
Some tests on Firefox v70The
While I expected it to use the default index:
Also I noticed that neither the Using |
Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.46 containing PR #8132 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
The question there was to link to another story, not to link to a page anchor. In my case it did work to link to other stories. I did not test anchors, so I'm sorry if I caused confusion on that part. |
Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-beta.15 containing PR #9051 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
Hi, could someone please link me to the sample code snippet to test it out ? |
@nik72619c you should get anchors on headers for free on .mdx files. So for example, I can link to the props section of this story: Or here's a way to add them globally based off of this example (although I'm super new to
|
@lisamartin00 I'm not seeing it work the way I'd expect. Not sure if somethings changed since then, but If I go to click on I might create a ticket with a minimum reproducible bug because I don't think this is working as intended |
@cgreene-st yes I agree - that is easily reproducible on their site, so it's probably either a regression or anchors are handled differently now since it's been over a year. sounds like it's worth filing a separate ticket 👍 |
For anyone that finds themselves here, the bug is being tracked here #16918 |
I am using
@storybook/addon-docs@5.2.1
. Is it possible to link to a header further in the document? We have sections that are quite long and would love to link between parts of the page.GitHub Wiki markdown would be something like this:
I know there is
@storybook/addon-links
, but I'm not sure that works in the MDX stories from what I've gathered poking through the GitHub issues here.The text was updated successfully, but these errors were encountered: