Get TOC
Parse Table of contents from markdown/mdx content
Parse Table of contents from markdown/mdx content.
Usage
Note: If you're using a CMS, you should use the API provided by the CMS instead.
Markdown/MDX
Parse markdown content and return an array of TOC items.
Portable Text (Sanity)
Takes a portable text and slug function, return an array of TOC items with their slug generated using the slug function.
Output
An array of TOCItemType is returned.
Last updated on