Skip to content

Add context7.json and Context7 refresh workflow - #349

Merged
martyanovandrey merged 4 commits into
masterfrom
context7
Sep 15, 2026
Merged

martyanovandrey merged 4 commits into
masterfrom
context7

Conversation

@martyanovandrey

Copy link
Copy Markdown
Contributor

Our docs are already indexed by Context7 as /diplodoc-platform/docs, but the index was created without any configuration from our side. This PR takes control of how the library is parsed.

context7.json

  • Indexes only the en tree. Both languages carry the same code examples, so indexing ru as well doubled every snippet in the agent context. Three guides exist only in ru so far (multilingual-projects, pdf-styles, the supported-languages include); they will show up once translated.
  • Excludes _assets, _images, .github and the repository README.
  • Adds rules: short YFM guidelines that Context7 shows to coding agents next to the snippets (closed blocks, relative .md links, toc.yaml, multiline tables, what is not enabled by default, how to build).

Refresh workflow

.github/workflows/context7-refresh.yml calls the Context7 refresh API on every push to master, so the index follows the docs instead of waiting for the popularity-based schedule (45 days for our rank). It needs the CONTEXT7_API_KEY repository secret; until it is set the job fails harmlessly.

Follow-ups outside the repo: claim the library in the Context7 dashboard (adds url and public_key to this file) and trigger a manual refresh once this is merged so the new configuration applies.

@github-actions

Copy link
Copy Markdown

✅ Documentation build

Revision built successfully
Revision preview link

Build logs

Warnings (2)

⚠️ en/guides/openapi.md: 168: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 265] [Context: " — the specification is displayed directly on the page (default value). If the size of the specification's json schema exceeds the value of ##maxOpenapiIncludeSize## (100 KB by default), the mode automatically switches to "]

⚠️ en/tools/docs/build.md: 52: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 109] [Context: " — a snapshot of the dependency graph (pages, included files, assets, missing paths, edge count), as well as "]

@github-actions

Copy link
Copy Markdown

✅ Documentation build

Revision built successfully
Revision preview link

Build logs

Warnings (2)

⚠️ en/guides/openapi.md: 168: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 265] [Context: " — the specification is displayed directly on the page (default value). If the size of the specification's json schema exceeds the value of ##maxOpenapiIncludeSize## (100 KB by default), the mode automatically switches to "]

⚠️ en/tools/docs/build.md: 52: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 109] [Context: " — a snapshot of the dependency graph (pages, included files, assets, missing paths, edge count), as well as "]

@github-actions

Copy link
Copy Markdown

✅ Documentation build

Revision built successfully
Revision preview link

Build logs

Warnings (2)

⚠️ en/guides/openapi.md: 168: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 265] [Context: " — the specification is displayed directly on the page (default value). If the size of the specification's json schema exceeds the value of ##maxOpenapiIncludeSize## (100 KB by default), the mode automatically switches to "]

⚠️ en/tools/docs/build.md: 52: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 109] [Context: " — a snapshot of the dependency graph (pages, included files, assets, missing paths, edge count), as well as "]

@martyanovandrey
martyanovandrey merged commit f4c702e into master Sep 15, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

✅ Documentation build

Revision built successfully
Revision preview link

Build logs

Warnings (2)

⚠️ en/guides/openapi.md: 168: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 265] [Context: " — the specification is displayed directly on the page (default value). If the size of the specification's json schema exceeds the value of ##maxOpenapiIncludeSize## (100 KB by default), the mode automatically switches to "]

⚠️ en/tools/docs/build.md: 52: YFM001 / inline-code-length Inline code length [Expected: 100; Actual: 109] [Context: " — a snapshot of the dependency graph (pages, included files, assets, missing paths, edge count), as well as "]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant