Expand description
MDX documentation parser for extracting frontmatter and components.
This module provides functionality to parse MDX (Markdown with JSX) content, extracting YAML frontmatter and converting custom components like Cards, Tabs, Steps, and Callouts into an intermediate representation for rendering.
Structs§
- Accordion
Group Node - Accordion group container.
- Accordion
Node - Collapsible accordion item.
- ApiInfo
- API metadata.
- ApiOperation
- API endpoint operation.
- ApiParameter
- API parameter.
- ApiRequest
Body - Request body definition.
- ApiResponse
- API response definition.
- ApiServer
- Server configuration.
- ApiTag
- Tag metadata.
- Callout
Node - Callout box node.
- Card
Group Node - Grid group of cards.
- Card
Node - Card node with optional link and icon.
- Code
Block Node - Fenced code block.
- Code
Group Node - Code group with multiple language variants.
- DocFrontmatter
- YAML frontmatter metadata from MDX files.
- Expandable
Node - Expandable section for nested content.
- Media
Type Content - Content for a specific media type.
- Open
ApiNode - OpenAPI specification viewer node.
- Open
ApiSpec - Parsed OpenAPI specification.
- Param
Field Node - API parameter documentation field.
- Parsed
Doc - Parsed documentation page with frontmatter and content.
- Request
Example Node - Container for API request examples.
- Response
Example Node - Container for API response examples.
- Response
Field Node - API response field documentation.
- Schema
Definition - Schema definition for a type.
- Step
Node - Individual step in a steps guide.
- Steps
Node - Sequential steps container.
- TabNode
- Tab in a tabbed interface.
- Tabs
Node - Tabbed content container.
- Update
Node - Changelog version update entry.
Enums§
- Callout
Type - Callout variant type.
- DocNode
- A node in the parsed documentation tree.
- Http
Method - HTTP method.
- Open
ApiError - Error type for OpenAPI parsing.
- Param
Location - Location of a parameter in an API request.
- Parameter
Location - Parameter location.
- Schema
Type - Schema type.
Functions§
- extract_
frontmatter - Extract YAML frontmatter from MDX content.
- get_
raw_ markdown - Get raw markdown from parsed content (for fallback rendering).
- highlight_
code - Apply syntax highlighting to code.
- parse_
document - Parse a complete MDX document, extracting frontmatter and content.
- parse_
mdx - Parse MDX content into a tree of DocNodes. Automatically strips frontmatter and import statements.
- parse_
openapi - Parse an OpenAPI specification from YAML or JSON content.