# Rimfe for Hugo documentation sites

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

Hugo content is Markdown under content/, which Rimfe reads, but setup does not detect Hugo, so you must set the scope yourself. Without one, the default covers every docs file in the repository, blog posts included. Name the docs section in docsGlobs and ignore the rest.

## Where the docs live

Markdown under `content/` (or a custom `contentDir`), with sections as folders and `_index.md` files as section pages. Themes may add their own `content` and layouts.

## What Rimfe watches

- Not detected. Rimfe has no Hugo marker, so nothing is suggested.
- Default scope: every `.md`, `.mdx`, `.rst` and `.adoc` file in the repository, except build, dist, vendor and similar folders and changelogs.
- Set `docsGlobs` to the docs section, such as `site/content/docs/**/*.md`.

## 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",
    "site/content/docs/**/*.md"
  ],
  "docsIgnorePaths": [
    "site/content/blog/**",
    "site/content/docs/_generated/**"
  ],
  "ignorePaths": [
    "**/*_test.go"
  ],
  "codeMappings": [
    {
      "source": "cmd/acme/**",
      "target": "site/content/docs/cli.md"
    }
  ]
}
```

## Worked example: the code change

A pull request changes `cmd/acme/serve.go`. Nothing in the pull request touches the docs.

```diff
- cmd.Flags().Int("port", 8080, "port to listen on")
+ cmd.Flags().Int("port", 3000, "port to listen on")
```

## Worked example: the page it makes wrong

`site/content/docs/cli.md` still states the old behavior. Rimfe quotes both sides as evidence and suggests this patch.

```diff
- `acme serve` listens on port 8080 unless you pass `--port`.
+ `acme serve` listens on port 3000 unless you pass `--port`.
```

## Limits

- Shortcodes are read as text, not rendered; a value passed through a shortcode is still checked as written.
- Front matter is skipped, so a claim that lives only in front matter is not reviewed.
- Data files under `data/` and layout templates are not docs pages.
- The `public/` output folder holds HTML and is not matched by Markdown globs.

## Related

- [Go: what Rimfe reads](https://rimfe.com/stacks/go)
- [What is docs-as-code](https://rimfe.com/learn/docs-as-code)
- [Templates](https://rimfe.com/templates)
- [Documentation scope](https://docs.rimfe.com/configuration/docs-scope)
