How to show toc for a markdown content using mdx? #1410
-
I was wondering how do i show a toc for a markdown file content using this library? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Using a remark plugin: |
Beta Was this translation helpful? Give feedback.
-
For anyone else who lands on this issue and needs to extract the table of contents from mdx so that they can display it elsewhere on their page (as opposed to transforming and including the markdown inline using https://github.com/dagster-io/dagster/blob/0110-docs/docs/next/pages/%5B...page%5D.tsx#L338-L341 |
Beta Was this translation helpful? Give feedback.
Using a remark plugin:
https://mdxjs.com/advanced/transform-content#transform-content
https://github.com/remarkjs/remark-toc