Docs

Type table

Render a props or options table from a type definition.

Open Markdown

A type table documents an API surface as a table rather than prose, so a reader scans for the field they need instead of reading paragraphs.

content/config.mdx
<auto-type-table path="src/config.ts" name="DocsConfig" />

The tag name is the component_name configured on TypeScriptDocgen; auto-type-table is the default.

Attributes

AttributeMeaning
pathFile to read the type from
nameNamed type inside that file
typeAn inline type literal, instead of path + name

The tag is deferred: the build records the request and emits a pending placeholder (<div data-proa-docs-type-table-pending>) holding the escaped directive. Nothing replaces that placeholder today: TypeScriptDocgen::command is only checked for presence, never run. Enabling docgen without a command fails the build as soon as any page requests a table, so the unconfigured case is never published silently; with a command configured, or with docgen disabled (the default), the placeholder ships as is.

Current limitation

Type extraction is TypeScript-shaped and not yet wired. The directive names a TypeScript file and type, and the build records the request without resolving it, so neither a TypeScript nor a Rust type produces a table today.

For Rust APIs, write the table by hand:

FieldTypeDefaultMeaning
base_path&'static str"/docs"URL prefix the site mounts under
site_name&'static str—Shown in the sidebar header

A rustdoc-driven source would let a config reference page shrink to a handful of lines. It is the highest-leverage thing missing from this crate — Fumadocs' whole MDX config surface is three generated tables and 111 words of prose.

Configuration · Markdown

Search

Type at least 2 characters