Replies: 1 comment 6 replies
-
Hi! I think the part where you're rendering MDX inside MDX again is making this too complicated. The way I understand it you want to have a Table of Contents component that you can pass in a prop and that you can place anywhere in your MDX files. I'd do it like this:
|
Beta Was this translation helpful? Give feedback.
6 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.
-
Preliminary Checks
Summary
I'm migrating my blog from Jekyll to Gatsby and I heavily relied on the Liquid templating language to create complex templates.
In Gatsby, this seems to be the equivalent of creating mdx templates where I can build new mdx by just passing props to the pre-made mdx templates. However, it was very difficult to find the right resources on how to do it.
I managed to figure out one potential way to do so and I was wondering if there is a better way. If not, I think this can be a valuable addition to the documentation.
Here's a gist
Steps to Resolve this Issue
Here's a gist
Beta Was this translation helpful? Give feedback.
All reactions