chore(docs): rename doc pages to .mdx - #4684
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
thetaPC
marked this pull request as ready for review
August 31, 2026 22:51
brandyscarney
requested review from
ShaneK
and removed request for
brandyscarney
September 1, 2026 14:05
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?
Doc pages are named
.md, but most of them are 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. When that default changes, every import becomes literal text and every component renders as nothing.What is the new behavior?
512 pages are renamed to
.mdx: 257 underdocsand 255 underversioned_docs/version-v8.641 links to those pages are rewritten to match. They appear in three shapes, and all three resolve today, so all three would have broken: relative links such as
../api/button.md, site absolute links such as/docs/api/button.md, and bare sibling links such ascolors.md. Each link was resolved to the file it actually points at and rewritten only when that file became.mdx.The ten
@site/docs/developing/configpartial imports are updated, which covers the five partials deferred from the playground rename.docusaurus.config.jsneeded a fix that is easy to miss. TheeditUrlpatterns were not anchored, soapi/(.*)\.mdstill matchedapi/alert.mdx, captured the name, and produced a link to a.mdfile that no longer exists. Every API page's "Edit this page" link would have pointed at a missing file, and nothing in the build would have reported it. The patterns are now anchored on the extension and carry the real one through.Three groups are deliberately left as
.md.The generated trees,
docs/nativeanddocs/cli/commands, are written byscripts/native.mjsandscripts/cli.mjson every build and self-ignore through nested.gitignorefiles. Renaming them would only fight the generators. The 87 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.Archived versions are untouched. v5, v6 and v7 keep all of their
.mdpages, since those versions are never built.Does this introduce a breaking change?
Other information
Merge this before the companion PR on
translation/jp. There is no time pressure after that, but the order matters: theextensionAliasentry added earlier rewrites.mdrequests to find.mdxfiles, not the reverse.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 2298 pages both before and after, with 0 errors. Broken links stay at 21 and broken anchors at 47, with none introduced by this change. Prettier reports no differences repo wide.
Two table alignments in
theming/advanced.mdxshifted, because.mdxis one character longer than.mdand the links sit inside a markdown table. Both files were clean before, so this is Prettier restoring the alignment the rename disturbed.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 or a dead link rather than as altered prose.
On each page, check that the content renders, that inbound links from the pages above land somewhere real, and that no raw
importline or literal component tag appears in the text.Also worth checking one "Edit this page" link at the bottom of an API page. It should open an existing
.mdxfile on GitHub rather than a 404.