# Rimfe for Docusaurus docs

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

Docusaurus keeps current docs in a docs folder, with older releases in versioned_docs. Point Rimfe at docs/**/*.{md,mdx} and ignore the versions, so a code change is checked against today's pages only. Setup detects docusaurus.config and suggests that folder; nothing is saved until you confirm it.

## Where the docs live

Current pages sit in `docs/` next to `docusaurus.config.js` (or in `website/docs/` when the site is a subfolder). Releases you froze live in `versioned_docs/`, and translations in `i18n/`.

## What Rimfe watches

- Detected by a `docusaurus.config.js`, `.ts`, `.mjs`, `.cjs` or `.mts` file anywhere in the repository.
- Suggested scope: `docs/**/*.{md,mdx}`, or `website/docs/**/*.{md,mdx}` for a config in `website/`, plus a root README.
- With no scope set, the default covers every docs file in the repository, `versioned_docs` included. Set the 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": [
    "README.md",
    "docs/**/*.{md,mdx}"
  ],
  "docsIgnorePaths": [
    "versioned_docs/**",
    "docs/api/reference/**"
  ],
  "ignorePaths": [
    "**/*.test.ts",
    "website/src/css/**"
  ],
  "codeMappings": [
    {
      "source": "packages/client/src/**",
      "target": "docs/api/client.mdx"
    }
  ]
}
```

## Worked example: the code change

A pull request changes `packages/client/src/client.ts`. Nothing in the pull request touches the docs.

```diff
- const DEFAULT_TIMEOUT_MS = 30_000;
+ const DEFAULT_TIMEOUT_MS = 10_000;
```

## Worked example: the page it makes wrong

`docs/api/client.mdx` still states the old behavior. Rimfe quotes both sides as evidence and suggests this patch.

```diff
- Requests time out after 30 seconds unless you pass `timeout`.
+ Requests time out after 10 seconds unless you pass `timeout`.
```

## Limits

- Imports and components are not expanded. A partial is read as its own page, so keep a claim and the code it describes in the same file.
- An `.mdx` file with broken JSX is read as plain Markdown and named in the run notes.
- Rimfe does not read `sidebars.js`, so a custom docs `path` needs your own glob.
- Translated copies under `i18n/` are listed on a finding and are not reviewed.

## Related

- [Docusaurus guide in the docs](https://docs.rimfe.com/guides/docusaurus)
- [TypeScript: what Rimfe reads](https://rimfe.com/stacks/typescript)
- [Templates](https://rimfe.com/templates)
- [What is docs-as-code?](https://rimfe.com/learn/docs-as-code)
