Why this exists
By default CodivDocs syncs every .md and .mdx file under docs/ in your repo. Anything outside that folder — README.md, CONTRIBUTING.md, AGENTS.md, files in src/ or plans/ — is ignored.
This stops random markdown files in your repo from accidentally becoming public docs pages and cluttering your search results.
Default behavior
{
"name": "My Docs",
"navigation": [...]
}With no contentRoot set, CodivDocs assumes "docs/". If your repo looks like this:
my-repo/
├── codiv.config.json
├── README.md ← ignored
├── docs/
│ ├── introduction.mdx → /introduction
│ └── api/
│ └── auth.mdx → /api/auth
└── src/
└── README.md ← ignoredOnly the two files under docs/ end up on your docs site.
Custom content root
If your docs live in a different folder, set contentRoot explicitly:
{
"name": "My Docs",
"contentRoot": "content/",
"navigation": [...]
}Now content/intro.mdx becomes /intro, and docs/legacy.mdx is ignored.
The contentRoot value must end with a trailing slash. "docs" is rejected by the validator — use "docs/".
Common patterns
Default
Use docs/ — works for 90% of repos. No config needed.
Monorepo
Set "contentRoot": "packages/docs/content/" so only that subtree syncs.
Content folder
Coming from a static site generator? Try "contentRoot": "content/".
Single file
Set "contentRoot": "." — but every .md in the repo becomes a page (not recommended).
What gets ignored
When the filter runs, these are skipped automatically because they live outside contentRoot:
README.md,CONTRIBUTING.md,LICENSE.mdAGENTS.md,CLAUDE.md,.cursorrulessrc/**/*.md,lib/**/*.md.github/**/*.mdAny
node_modules/markdownAny markdown anywhere outside
contentRoot
The match is a prefix check on the file path, so anything that starts with the configured root is included; everything else is dropped before the sync job even fetches the file content.
Troubleshooting
"My README is showing up as a page"
Make sure contentRoot is set and ends with /. After the next push, the existing /readme page will be removed automatically because it's no longer in the filtered file list.
"I want to include some files outside docs/"
Move them into docs/ (recommended) or set contentRoot to a higher-level folder that contains both. There is no exclude/include glob today — Phase 9 will introduce a .codivdocsignore file for fine-grained control.
"Where is the file path → URL mapping documented?"
The contentRoot prefix is stripped, the .mdx extension is removed, and index becomes /. See the Navigation guide for the full URL mapping rules.