Create a Table of Contents Component for MDX Documents in Gatsby

InstructorJohn Otander

Share this video with your friends

Send Tweet

When you use a component for your table of contents in MDX documents you have more flexibility around how you render it. In this lesson, we'll use Gatsby's GraphQL data layer to fetch the headings in an MDX document and pass them to a TableOfContents component that we create.