Repository navigation
ci(docs): validate docs.json and redirect destinations - #2329
Merged
Merged
Conversation
Point DAppKit at Reown, old celocli utils/registry at cli/network, key recovery and MetaMask setup at metamask/use, Mento oracles at oracles/run, and align existing sibling entries (walkthroughs, consensus, recovery) with the same targets. Refs #2298
Run `mintlify validate`, which rejects duplicate redirect sources, and `broken-links --check-redirects`, which fails on destinations that do not resolve to a page. Closes #1846
This was referenced Sep 24, 2026
GigaHierz
approved these changes
Sep 24, 2026
GigaHierz
left a comment
Contributor
There was a problem hiding this comment.
Approving. Note for the record: this PR was briefly closed when I merged #2328 with --delete-branch — deleting the base branch closes a stacked PR rather than retargeting it. I restored the ref, reopened, and retargeted to main. After update-branch the diff reconciles down to the workflow file alone, which is the intended end state.
Verified the new checks pass against current main:
$ npx mintlify@4.2.910 validate
success build validation passed
$ npx mintlify@4.2.910 broken-links --check-redirects
success no broken links found
So this turns on without an immediate red build, which only holds because #2328 landed first.
Two things I checked that are easy to get wrong:
- The required status check context is the job name (
Check for broken links), and this diff only renames steps. The context is unchanged, so the branch ruleset keeps matching and no protection update is needed. - Ordering
validatebeforebroken-linksis the right call and the comment explains why: a duplicate redirect source otherwise surfaces as ~100 unrelated broken links, which is exactly the failure mode that makes people ignore the job.
Closes #1846.
4 of 6 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI ran
mintlify broken-linkswithout its redirect option, so nothing checked theredirectsarray indocs.json: a destination could point at a missing page or at/, and a duplicate source failed the job only indirectly, as about 100 unrelated broken links. This addsmintlify validateas the first step and turns on--check-redirects, both existing Mintlify CLI features, so the three cases #1846 asks about are covered without a custom script.The PR is stacked on #2328. On
main,broken-links --check-redirectsfails on the 9 redirects that point at/, and #2328 re-points them. The workflow only runs for PRs intomain, so the checks start here once #2328 merges and GitHub retargets this PR.What each step catches
Tested with
mintlify4.2.910, the versionnpxinstalls in CI:mintlify validate: "Each source path can only be used once", exit 1/broken-links --check-redirects#anchorin a destinationDropped from #1846
The issue also asked to keep the redirects sorted alphabetically. It was written against the Docusaurus
_redirectsfile, which #2040 removed. In Mintlify an exact source beats any:slug*wildcard wherever it sits in the array, and order only matters between two wildcards. No wildcard today sits inside another's prefix, so a sort buys nothing, and it would make every insertion a large diff. Tested inmint devand against production.Closes #1846.