# Rimfe for GitBook repositories

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

When GitBook syncs a space with a GitHub repository, your pages are Markdown files in git, and Rimfe can review them. Setup detects .gitbook.yaml and reads its root folder. Content that exists only inside GitBook's editor, with no sync, is not in git and is not seen.

## Where the docs live

Markdown files in the repository folder named by `root` in `.gitbook.yaml` (the repository root by default), with `SUMMARY.md` as the table of contents and `README.md` as the landing page.

## What Rimfe watches

- Detected by a `.gitbook.yaml` or `.gitbook.yml` file; its `root` setting names the folder.
- Suggested scope: that folder with the docs formats found in it.
- `SUMMARY.md` is a table of contents; ignore it so it is not treated as a page of claims.

## 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"
  ],
  "docsIgnorePaths": [
    "docs/SUMMARY.md"
  ],
  "codeMappings": [
    {
      "source": "action.yml",
      "target": "docs/github-action.md"
    }
  ]
}
```

## Worked example: the code change

A pull request changes `action.yml`. Nothing in the pull request touches the docs.

```diff
-   token:
-     required: false
+   token:
+     required: true
```

## Worked example: the page it makes wrong

`docs/github-action.md` still states the old behavior. Rimfe quotes both sides as evidence and suggests this patch.

```diff
- The `token` input is optional.
+ The `token` input is required.
```

## Limits

- Only synced content is in git. Pages that exist only in GitBook are not reviewed.
- GitBook-specific blocks (hints, tabs, embeds) are read as the text the sync writes.
- A patch is a pull request on your repository; GitBook picks it up through sync.
- Rimfe does not call the GitBook API.

## Related

- [Rimfe vs GitBook](https://rimfe.com/compare/gitbook)
- [OpenAPI: what Rimfe reads](https://rimfe.com/stacks/openapi)
- [Templates](https://rimfe.com/templates)
- [What is docs-as-code?](https://rimfe.com/learn/docs-as-code)
- [Hosted docs sites](https://rimfe.com/integrations/hosted-docs)
