From a60042ba82635025ca4b91bc1f4e3ad009d3e66b Mon Sep 17 00:00:00 2001 From: martyanov-av Date: Tue, 15 Sep 2026 08:42:13 +0300 Subject: [PATCH 1/4] Add context7.json --- context7.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 context7.json diff --git a/context7.json b/context7.json new file mode 100644 index 00000000..ce09c372 --- /dev/null +++ b/context7.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://context7.com/schema/context7.json", + "projectTitle": "Diplodoc", + "description": "Docs-as-code platform: YFM (Yandex Flavored Markdown) syntax, the yfm CLI builder (@diplodoc/cli), toc.yaml navigation, translation, and publishing.", + "folders": ["en"], + "excludeFolders": ["_assets", "_images", ".github"], + "excludeFiles": ["README.md"], + "rules": [ + "Diplodoc uses YFM (Yandex Flavored Markdown): CommonMark plus extensions processed by the yfm builder. Keep base text GFM-compatible and put YFM specifics in explicit blocks.", + "Every YFM block must be closed and surrounded by blank lines: {% note %}...{% endnote %}, {% cut %}...{% endcut %}, {% list tabs %}...{% endlist %}, multiline tables #|...|#. An unclosed block is a build error.", + "Links to other pages are relative paths with the .md extension and must point to files listed in toc.yaml, otherwise the build fails with YFM003 unreachable-link.", + "Every page must be listed in toc.yaml (items with name and href). Files that are not in toc.yaml are not built.", + "Use {% note info|tip|warning|alert %} only for genuinely important remarks. A plain quote is a blockquote with >.", + "Use GFM tables for simple data. For block content or merged cells use multiline tables: #| || cell | cell || |#, where > joins with the cell to the left and ^ with the cell above.", + "Includes: {% include [text](path/to/file.md) %} with the path relative to the current file. Variables come from presets.yaml and are written as {{ name }}.", + "Image size is set with attributes: ![Alt](_images/pic.png){width=800}. Keep images in a directory prefixed with an underscore, such as _images.", + "Do not use raw HTML, footnotes [^1], task lists - [ ], subscript ~x~ or underline ++x++: they are not enabled by default and render as literal text.", + "One H1 per file, consecutive heading levels, no emoji (linter rule YFM021).", + "Build locally with: npx -p @diplodoc/cli yfm -i -o . Add --strict to turn warnings into errors." + ] +} From 681089c3e71fa196ca3dbde0a1cd7d6e7aed547b Mon Sep 17 00:00:00 2001 From: martyanov-av Date: Tue, 15 Sep 2026 08:42:19 +0300 Subject: [PATCH 2/4] Add Context7 refresh workflow --- .github/workflows/context7-refresh.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/context7-refresh.yml diff --git a/.github/workflows/context7-refresh.yml b/.github/workflows/context7-refresh.yml new file mode 100644 index 00000000..4fde7e8b --- /dev/null +++ b/.github/workflows/context7-refresh.yml @@ -0,0 +1,19 @@ +name: Refresh Context7 docs + +on: + push: + branches: + - master + +jobs: + refresh: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Trigger Context7 refresh + run: | + curl -sS -X POST https://context7.com/api/v1/refresh \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer ${{ secrets.CONTEXT7_API_KEY }}" \ + -d '{"libraryName": "/${{ github.repository }}"}' From 44def5efcc4e090ceb3bfd39f880bdb58f0872a9 Mon Sep 17 00:00:00 2001 From: martyanov-av Date: Tue, 15 Sep 2026 08:47:34 +0300 Subject: [PATCH 3/4] Allow manual Context7 refresh via workflow_dispatch --- .github/workflows/context7-refresh.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/context7-refresh.yml b/.github/workflows/context7-refresh.yml index 4fde7e8b..84360281 100644 --- a/.github/workflows/context7-refresh.yml +++ b/.github/workflows/context7-refresh.yml @@ -4,6 +4,7 @@ on: push: branches: - master + workflow_dispatch: jobs: refresh: From 8dced76ceddeb420cb4a1d649bffa540813e7cff Mon Sep 17 00:00:00 2001 From: martyanov-av Date: Tue, 15 Sep 2026 08:49:05 +0300 Subject: [PATCH 4/4] Claim the Context7 library --- context7.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/context7.json b/context7.json index ce09c372..aa6778b9 100644 --- a/context7.json +++ b/context7.json @@ -2,9 +2,17 @@ "$schema": "https://context7.com/schema/context7.json", "projectTitle": "Diplodoc", "description": "Docs-as-code platform: YFM (Yandex Flavored Markdown) syntax, the yfm CLI builder (@diplodoc/cli), toc.yaml navigation, translation, and publishing.", - "folders": ["en"], - "excludeFolders": ["_assets", "_images", ".github"], - "excludeFiles": ["README.md"], + "folders": [ + "en" + ], + "excludeFolders": [ + "_assets", + "_images", + ".github" + ], + "excludeFiles": [ + "README.md" + ], "rules": [ "Diplodoc uses YFM (Yandex Flavored Markdown): CommonMark plus extensions processed by the yfm builder. Keep base text GFM-compatible and put YFM specifics in explicit blocks.", "Every YFM block must be closed and surrounded by blank lines: {% note %}...{% endnote %}, {% cut %}...{% endcut %}, {% list tabs %}...{% endlist %}, multiline tables #|...|#. An unclosed block is a build error.", @@ -17,5 +25,7 @@ "Do not use raw HTML, footnotes [^1], task lists - [ ], subscript ~x~ or underline ++x++: they are not enabled by default and render as literal text.", "One H1 per file, consecutive heading levels, no emoji (linter rule YFM021).", "Build locally with: npx -p @diplodoc/cli yfm -i -o . Add --strict to turn warnings into errors." - ] + ], + "url": "https://context7.com/diplodoc-platform/docs", + "public_key": "pk_rUH3BG1SSobCfrNiJn0k6" }