chore(v6): rename archived v6 pages and usage partials to .mdx - #4699
Open
thetaPC wants to merge 1 commit into
Open
chore(v6): rename archived v6 pages and usage partials to .mdx#4699thetaPC wants to merge 1 commit into
thetaPC wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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?
Every live doc page has moved to
.mdxas part of the Strict MDX migration, but the archived versions were deliberately left alone, since they are never built.That holds only while they stay archived. Most of these pages are MDX in everything but name: 170 of v6's 236 pages contain imports and 131 contain JSX. Once Strict MDX is enabled, reviving this version would parse those as plain CommonMark, turning every import into a line of literal text on the page. It would not fail the build, so the first sign of trouble would be a reader seeing an import statement in the middle of a paragraph.
Archived versions are revivable by design: the archiving guide already documents moving one back into
versions.json. So leaving them behind converts a documented, supported operation into one that silently produces broken pages.There is a second, more immediate problem. The CLI and Capacitor plugin pages are now generated as
.mdx, but v6's pages still link to them as.md. Those links are already dead in a build where v6 is present.What is the new behavior?
v6 is migrated to match the live versions: 235 pages and 312 playground partials renamed, along with the references between them, 540 component API imports, 317 playground imports, and 213 internal links.
versioned_docs/version-v6/README.mdkeeps its extension. It is a contributor note excluded from the site by theexcludesetting, which names the file by extension, so renaming it would publish it as a page.Nothing about the archived state changes. v6 stays in
versionsArchived.json, stays out ofversions.json, and is still not built. This only makes it safe to revive later.Does this introduce a breaking change?
Does this introduce a breaking change?
Other information
This is the second of three, following v7 and ahead of v5. The three are independent, since each touches only its own version tree, so they can merge in any order.
All three land before the transitional compatibility code is removed, and that order matters. These archived pages currently import 450 component API partials by their
.mdnames, which only resolve because the plugin still writes both. Removing that first would leave the archived versions broken and then fix them afterwards. Doing the versions first means nothing anywhere imports the old names by the time it comes out.The same work then goes to
translation/jp, and reachesmajor-10.0through the usual sync.Verification was done by temporarily reviving the version, since archived pages are otherwise never built and a mistake here would have no signal at all.
How to test
Archived versions are not built, so nothing in a normal preview exercises these pages. To check them, revive the version locally:
v6out ofversionsArchived.jsonand back intoversions.json.versioned_docs/version-v6back to the write targets inscripts/native.mjsandscripts/cli.mjs, so the generated CLI and plugin pages exist for it.npm run generate-markdown, thennpx docusaurus buildwith no--localeflag.The build should complete with no errors, and
/docs/v6/should render. Worth spot checking an API page for its generated tables and playgrounds, and following a link from a v6 page into the CLI or plugin docs, since those are the links this PR repairs.