Sharing MDX Heading Link for Enhanced Navigation #60347
Unanswered
tomfanhm
asked this question in
Show and tell
Replies: 1 comment
-
It would be great if you describe in plain text what your code does. Motivation/use case/gains. Not everybody is willing to read code before evaluating relevance. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I wanted to share a piece of code that I've been working on. It's an MDX heading link, designed to improve the navigation experience within MDX files. This could be particularly useful for those who are creating documentation or content-rich applications using Next.js 14.0 and MDX. I'm look forward to your feedback and suggestions.
Resource: https://nextjs.org/docs/pages/building-your-application/configuring/mdx
mdx-components.tsx
function findHeadings
MdxLayout.tsx
Finally, wrap your MDX content with the MdxLayout component in your page.mdx files. :)
Beta Was this translation helpful? Give feedback.
All reactions