Context7 Platform -- Up-to-date docs for AI agents
docs(library-owners): clarify folders/excludeFolders priority (#2799)
Enes Gules73542b72d57e
diff --git a/docs/library-owners.mdx b/docs/library-owners.mdxindex 837471a8..456a988b 100644--- a/docs/library-owners.mdx+++ b/docs/library-owners.mdx@@ -76,6 +76,25 @@ Here's an example `context7.json` file with all available options:be available in Context7.- **`branch`**: The Git branch+### How `folders` and `excludeFolders` interact++`excludeFolders` always takes priority over `folders`. Evaluation order for any given file:++1. Does the file's path (or any ancestor directory) match an `excludeFolders` pattern? → **excluded**, stop.+2. Is `folders` non-empty and the file is not under any listed folder? → **excluded**, stop.+3. Otherwise → **included**.++**Example — scan selected directories but skip archived content:**++```json+{+ "folders": ["docs", "api-reference"],+ "excludeFolders": ["docs/archive", "**/old"]+}+```++This scans only `docs/` and `api-reference/`, but within those it skips `docs/archive/` and any folder named `old` at any depth.+### Exclusion PatternsThe `excludeFolders` parameter supports various pattern types for flexible exclusion: