Content API
Loading and querying documentation content
Utilities for loading MDX content from the filesystem.
GetDoc
Load a single document by slug.
| prop | type |
|---|---|
dir | string |
slug | string[] |
GetDoc returns
Returns Doc | null. Null if the file doesn't exist.
GetAllDocs
Load metadata for all documents in a directory.
| prop | type |
|---|---|
dir | string |
GetAllDocs returns
Returns DocMeta[] sorted by order field.
GetNavigation
Generate navigation structure from documents.
Groups documents by first folder segment. Top-level pages stay in one root section. Section titles use _meta.json title when present.
DefineContent
Create a typed content loader with custom schema.
| prop | type |
|---|---|
dir | string |
schema? | ZodObject |
DefineContent returns
Schema utilities
BaseSchema
The default frontmatter schema.
ExtendSchema
Extend the base schema with additional fields.
DefineSchema
Define a completely custom schema (not extending base).