Skip to content

Rimfe for Nextra docs

Nextra turns MDX files into docs pages, ordered by _meta files. Rimfe detects those _meta files under pages, content or app, and watches the MDX around them. Add your public option names to the surface list and Rimfe also reports which of them no page mentions.

Updated

Where the docs live

.mdx or .md pages under pages/, content/ or app/, with _meta.js, _meta.json or _meta.ts files that order the sidebar. Older sites keep a theme.config.jsx.

What Rimfe watches

  • Detected by a _meta file under a pages, content or app folder, or by theme.config.js or .jsx.
  • Suggested scope: that folder, with the docs formats found in it.
  • surface names are counted for docs coverage: each public option and which pages mention it.

Sample .rimfe.json

Commit this to your default branch, then set Documentation scope to .rimfe.json at the PR base on the repository's Advanced settings tab. Rimfe reads it from each pull request's base commit.

.rimfe.json
{  "$schema": "https://rimfe.com/schema/rimfe.json",  "docsGlobs": [    "content/**/*.{md,mdx}"  ],  "docsIgnorePaths": [    "content/changelog/**"  ],  "codeMappings": [    {      "source": "packages/core/src/config/**",      "target": "content/configuration.mdx"    }  ],  "surface": [    "cache",    "retries",    "RETRY_LIMIT"  ]}

Worked example: the code change

A pull request changes packages/core/src/config/defaults.ts. Nothing in the pull request touches the docs.

packages/core/src/config/defaults.ts
- export const defaults = { retries: 3 };+ export const defaults = { retries: 5, backoff: true };

Worked example: the page it makes wrong

content/configuration.mdx still states the old behavior. Rimfe quotes both sides as evidence and suggests this patch.

content/configuration.mdx
- `retries` defaults to 3. Each retry waits one second.+ `retries` defaults to 5, and `backoff` (default `true`) doubles the wait after each retry.

Limits

  • _meta files order pages and are not patched.
  • Components imported into MDX are not expanded.
  • The surface list needs your own names. Rimfe does not guess which options are public.
  • An .mdx page with invalid syntax is read as Markdown and named in the notes.

Try it on your next pull request.

Free for public repositories, with unlimited members.

Start free with GitHub