# Rimfe for Fumadocs sites

Source: https://rimfe.com/docs-frameworks/fumadocs
Updated: October 30, 2026

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.

## 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.

```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.

```diff
- 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.

```diff
- 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.

## Related

- [TypeScript: what Rimfe reads](https://rimfe.com/stacks/typescript)
- [Prevent documentation drift](https://rimfe.com/guides/prevent-documentation-drift-github-prs)
- [Templates](https://rimfe.com/templates)
- [What is llms.txt?](https://rimfe.com/learn/llms-txt)
- [Documentation scope](https://docs.rimfe.com/configuration/docs-scope)
- [llms.txt generator and validator](https://rimfe.com/tools/llms-txt)
