Skip to content

Rimfe for Fumadocs sites

Fumadocs keeps pages as MDX in content/docs, usually inside an app that also holds the code they describe. Rimfe finds the folder from source.config.ts or the meta.json files, so a pull request that changes the app is checked against those pages in the same repository.

Updated

Where the docs live

content/docs/**/*.mdx with a meta.json in each folder for the page tree, wired up by source.config.ts. The site is often one app inside a monorepo.

What Rimfe watches

  • Detected by source.config.ts (or .js, .mjs) or by meta.json files under content/docs.
  • Suggested scope: the docs directory from source.config, or content/docs, in the app's folder.
  • A docs app in a monorepo gets its own folder in the suggested glob.

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": [    "apps/web/content/docs/**/*.{md,mdx}"  ],  "ignorePaths": [    "apps/web/src/components/**"  ],  "codeMappings": [    {      "source": "apps/web/src/env.ts",      "target": "apps/web/content/docs/deployment.mdx"    },    {      "source": "packages/sdk/src/**",      "target": "apps/web/content/docs/sdk/"    }  ]}

Worked example: the code change

A pull request changes apps/web/src/env.ts. Nothing in the pull request touches the docs.

apps/web/src/env.ts
- DATABASE_URL: z.string().url(),+ POSTGRES_URL: z.string().url(),

Worked example: the page it makes wrong

apps/web/content/docs/deployment.mdx still states the old behavior. Rimfe quotes both sides as evidence and suggests this patch.

apps/web/content/docs/deployment.mdx
- Set `DATABASE_URL` to your connection string before you start the server.+ Set `POSTGRES_URL` to your connection string before you start the server.

Limits

  • meta.json page-tree files are not docs pages and are not patched.
  • Pages built from OpenAPI by the Fumadocs OpenAPI plugin are matched to the spec when a code mapping links them.
  • Components imported into MDX are not expanded.
  • A docs app in a monorepo needs the app folder in every glob.

Try it on your next pull request.

Free for public repositories, with unlimited members.

Start free with GitHub