MDX
Readma can compile MDX sources into the readme sections of workspace members. MDX gives you JSX components inside markdown — handy for structured content like comparison tables or lists generated from data.
Only workspace member sections can be overridden with MDX. The root
readme is fully driven by readma.config.ts.
How to
-
Add a
readma/sectionsfolder inside the member:packages/core/└── readma/└── sections/└── usage.mdx -
Write the section content in
usage.mdx(the file name is the section key):## Basic usageImport the renderer and feed it your template args:import { readme } from "@readma/core";const markdown = await readme(args); -
Rerun
gen— the member readme now embeds the compiled MDX.
deno run -A jsr:@readma/cli gen
Precedence
For each section key, the first match wins:
readma/sections/<key>.mdxin the member folder (compiled),sections.<key>fromreadma.config.ts,- the automatic
installationsnippet (only for that key).
Empty or broken MDX files are skipped with a warning and the config value is used instead — a half-written MDX file never breaks a generation.
Which keys can be overridden
Any key: builtin section keys (features, usage, roadmap…) as well as
your custom section keys. The section heading itself (title, emoji, position)
still comes from the section pipeline, so MDX only replaces the body.