Unstructured Content
Unstructured Content
Markdown content, templates, layouts, and bi-directional extraction
The Unstructured Content layer handles the Markdown body of MDX documents - the human-readable prose that sits between the frontmatter and components.
Markdown Processing
MDX extends standard Markdown with JSX support, allowing rich content that combines prose with interactive components.
Templates (Layouts)
Templates define how structured data renders to markdown and extracts back to objects.
Convention-Based Layouts
Objects automatically render to markdown following conventions:
Output:
Layout Conventions
| Shape Pattern | Markdown Output |
|---|---|
name (top-level) | # {name} |
description | Paragraph after title |
| Nested object | ## {Key} section |
string[] | Bullet list |
object[] (flat) | Table |
object[] (complex) | ### {name} subsections |
Custom Layouts
For full control, use explicit templates:
Bi-directional Extraction
The @mdxld/markdown package enables round-trip editing:
Use Cases
- Headless CMS - Edit rendered content, sync back to frontmatter
- AI Editing - Let AI improve content, extract the changes
- Round-trip Sync - Keep source MDX and rendered output in sync
- Content Migration - Transform between formats while preserving structure
- Documentation - Generate docs from schemas, accept edits back
See Structured Data for schema definitions and UI Components for JSX rendering.