Structurize

Extract information from your documents

Usage

Accepts MDX/markdown content and return structurized data. Useful for implementing document search.

import { structure } from 'next-docs-zeta/mdx-plugins'
 
structure(page.body.raw)

Parameters

Parameter
contentMDX/markdown content
remarkPluginsList of remark plugins
optionsCustom options

Options

Option
typesScanned element types (remark)

Output

A list of headings and contents. Paragraphs will be extracted to the contents array, each item contains a heading prop indicating the heading of paragraph.

Note: A heading can have multiple paragraphs.

Heading

Prop
idunique identifer or slug of heading
contentText content

Content

Prop
headingHeading of paragraph (nullable)
contentText content

Last updated on