chore(i18n, docs): rename doc pages and usage partials to .mdx - #4686
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ShaneK
approved these changes
Sep 1, 2026
ShaneK
left a comment
Member
There was a problem hiding this comment.
Looks good to me, awesome work 🎉
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.
Issue URL: internal
What is the current behavior?
Most doc pages on this branch are named
.mdwhile actually being MDX: they import components and render JSX. They work today only because Docusaurus still parses.mdas MDX by default.Docusaurus is moving toward Strict MDX, where
.mdis parsed as CommonMark instead. Once that flag is enabled, every import becomes literal text and every component renders as nothing.That flag will be enabled on main and on this branch. Main has already moved its pages over, so leaving this branch behind would mean it breaks at that point rather than at a time of our choosing.
What is the new behavior?
951 files are renamed to
.mdx: 265 pages underdocs, 255 underversioned_docs/version-v8, and the 431 playground partials understatic/usage/v8.The references to them are rewritten to match: 654 markdown links, 935 component API imports, 439 playground imports, and the 5 config partial imports. Each link was resolved to the file it actually points at and rewritten only where that file became
.mdx.Two config fixes come with it.
The
editUrlpatterns indocusaurus.config.jswere not anchored, soapi/(.*)\.mdstill matchedapi/alert.mdx, captured the name, and produced a link to a file that no longer exists. Every API page's "Edit this page" link would have pointed at a missing file with nothing in the build to report it. This matches the fix already on main.The glossary entries in
.prettierignorenamed the old extension, so the rename silently dropped those files out of the ignore list. That protection is still needed here: this branch's glossary pages use raw HTML anchors, and prettier's mdx parser reflows their children onto separate lines, which MDX then wraps in a paragraph and renders as invalid markup. The patterns now cover both extensions, which also keeps the archived v7 copy protected.Three groups are deliberately left as
.md.Archived versions are untouched: v5, v6 and v7 keep all of their pages and their
static/usagepartials, since those versions are never built.The generated trees,
docs/nativeanddocs/cli/commandsand their v8 copies, are rewritten by the generation scripts on every build and self-ignore through nested.gitignorefiles. The 66 links pointing into them are unchanged for the same reason.docs/README.mdand its v8 copy are contributor notes with no imports or JSX, andexclude: ['README.md']keeps them out of the site. Renaming them would drop them out of that exclude and publish them as pages.Does this introduce a breaking change?
Other information
This does not need to be coordinated with anything on main. That was verified rather than assumed: a Japanese build combining main's tree with this branch's prose in its unmigrated form completed with no errors and no unresolved modules, because the
extensionAliasentry resolves the old names. The two branches can move independently.It does depend on the plugin change that already merged here, which is what makes the
.mdxpartial names exist for this branch's own build to import.The scope is larger than main's equivalent PR because it also completes what the playground rename deliberately left behind. That PR moved only the v9 partials, since this branch's
versioned_docswas out of scope at the time. Migrating the v8 pages means their partials have to follow, so they are included here.Verification was done by diffing a full build against a build of this branch taken before any changes, since a wrong link does not fail the build.
onBrokenLinksis only set towarn, so a mistake here would ship silently. The build produces 2326 pages both before and after, with 0 errors. Broken links stay at 24 and broken anchors at 103, with none introduced. Prettier reports no differences across the touched paths.How to test
Nothing should look different. The rename changes how pages are named and linked, not what they contain, so a failure shows up as a missing page, a dead link, or an empty API table rather than as altered prose.
On each page, check that the content renders, that the framework tabs in each playground show code, and that no raw
importline or literal component tag appears in the text.