Repository navigation
docs: Create mintlify site - #1617
Conversation
2a05f00 to
7df4565
Compare
[Medium impact] The PR changes how readers find and maintain a broad set of IBC documentation. Fix the release freeze's navigation lookup before merging; the remaining findings concern broken documentation links and gaps in the checking tools. Findings
SummaryMoves the documentation into a Mintlify site under
|
| const dropdownLabel = DROPDOWN_LABELS[subdir] || subdir.toUpperCase(); | ||
| const dropdown = (docsJson.navigation?.dropdowns || []).find(d => d.dropdown === dropdownLabel); | ||
| if (!dropdown || !Array.isArray(dropdown.versions)) { | ||
| throw new Error(`No "${dropdownLabel}" dropdown found in docs.json.`); |
There was a problem hiding this comment.
updateNavigation reads navigation.dropdowns, but docs.json puts IBC-Go under navigation.tabs with a tab field. Every documented freeze therefore throws after copying and stamping the archive, before updating navigation, the registry, or freeze metadata. Find the IBC-Go tab instead, and check that it exists before writing the archive.
| - [What is IBC](docs/ibc/introduction/what-is-ibc.mdx) is a high level overview of what IBC does and what it is for. | ||
| - [How IBC works](docs/ibc/how-ibc-works/overview.mdx) covers the components that carry one packet between two chains. | ||
| - [IBC CLI](docs/ibc/ibc-cli/overview.mdx) covers deploying IBC and running the processes that operate it. |
There was a problem hiding this comment.
These links use unnumbered paths that do not exist. For example, docs/ibc/introduction/what-is-ibc.mdx is actually docs/ibc/01-introduction/01-what-is-ibc.mdx. All three links here are affected, along with the guide, tutorial, command, and configuration links in cli/README.md. Update them to the numbered paths committed by this PR; site redirects cannot fix repository links on GitHub.
| IMAGE_EXT = (".png", ".svg", ".jpg", ".jpeg", ".gif", ".webp") | ||
|
|
||
| _FENCE = re.compile(r"(```.*?```|~~~.*?~~~)", re.S) | ||
| _LINK = re.compile(r"\]\((?![a-z][a-z0-9+.-]*:|/)([^)]+?\.md)(#[^)]*)?\)", re.I) |
There was a problem hiding this comment.
Spec cross-links miss their pages
_LINK only rewrites targets ending in .md, so directory links survive unchanged. The published host-requirements page still links to ../ics-002-client-semantics, but the destination is published at /ibc/spec/core/ics-002-client-semantics/README. Readers reach a missing route because the link omits README. Resolve directory targets to their published README paths too, and add a test using an existing spec link.
| const newTree = trees[newRef]; | ||
| if (newTree && !treeHas(newTree, l.path)) { | ||
| l.verdict = VERDICTS.PATH_GONE; | ||
| l.reason = `path does not exist at ${newRef}; renamed or deleted upstream`; | ||
| continue; | ||
| } | ||
|
|
||
| if (!l.anchor) { | ||
| l.verdict = VERDICTS.BUMP; | ||
| l.reason = `path exists at ${newRef} and there is no anchor to invalidate`; |
There was a problem hiding this comment.
A failed tree fetch sets trees[newRef] to null, but this branch still marks unanchored links as BUMP. If the new release branch does not exist yet, or GitHub refuses the request, --fix can replace working links with URLs whose targets were never checked. Return UNASSESSED when the target tree is unavailable instead of treating the missing check as proof that the path exists.
| // The same URL can appear on several lines and yields one record each; the | ||
| // first record rewrites them all, so count occurrences, not records. | ||
| const parts = text.split(l.url); | ||
| if (parts.length > 1) { | ||
| count += parts.length - 1; | ||
| text = parts.join(replacement); |
There was a problem hiding this comment.
text.split(l.url) also replaces longer URLs that start with a fixable URL. When a page has both a plain link and a flagged #L... link to the same file, replacing the plain link's prefix changes the flagged link's branch too. Its old line number can then point at different code. Replace complete link occurrences; sorting fixable records cannot protect flagged records excluded from that list.
| import { fileURLToPath } from "url"; | ||
|
|
||
| const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", ".."); | ||
| const FROZEN = path.join(ROOT, "ibc-go", "v10.1.x"); |
There was a problem hiding this comment.
The check only reads v10.1.x, although the new release workflow creates more version directories. A later archive can lose noindex or point its canonical at a missing page while this CI check still passes. Discover archived directories from the tree or versions.json and check each one.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1617 +/- ##
==========================================
- Coverage 43.55% 43.50% -0.05%
==========================================
Files 145 145
Lines 15728 15728
==========================================
- Hits 6850 6843 -7
- Misses 8334 8340 +6
- Partials 544 545 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a016b64 to
714b112
Compare
Migrates the ibc-go documentation out of cosmos/docs into this monorepo as a Mintlify site rooted at docs/, and brings the existing ibc docs into it. - docs/ibc/: the protocol, its applications, light clients, the IBC CLI and the Solidity contracts, grouped by subject into five nav tabs - docs/ibc-go/: 236 pages for the Go implementation, in latest/ and a frozen v10.1.x/ - docs/ibc/spec/: 42 pages generated from spec/ by docs/scripts/specgen.py - docs/ibc/05-ibc-cli/04-reference/: tables generated from cli/, proto/ and gen/ by docs/scripts/refgen.py Both generators have a --check mode; neither runs in CI, so follow docs/scripts/AGENTS.md after changing cli/, proto/ or gen/. Also restores // comment markers that a reflow in the original import had truncated to a single / across 1,386 lines, pins line-anchored GitHub links to commit SHAs so the anchors cannot slide, and repoints Cosmos SDK links the SDK docs moved. Signed-off-by: evanorti <87997759+evanorti@users.noreply.github.com>
1f9fede to
9480144
Compare
Description
Migrates the IBC documentation into this repo as a Mintlify site under docs/, replacing the copy in cosmos/docs. FOU-1874.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/) if anything is changed.godoccomments if relevant.Files changedin the GitHub PR explorer.