chore(v7): rename archived v7 pages and usage partials to .mdx - #4698
Open
thetaPC wants to merge 1 commit into
Open
chore(v7): rename archived v7 pages and usage partials to .mdx#4698thetaPC 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: 185 of v7's 240 pages contain imports and 136 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 v7's pages still link to them as.md. Those links are already dead in a build where v7 is present.What is the new behavior?
v7 is migrated to match the live versions: 239 pages and 401 playground partials renamed, along with the references between them, 522 component API imports, 405 playground imports, and 281 internal links.
versioned_docs/version-v7/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. v7 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?
Other information
This lands before the transitional compatibility code is removed, and that order matters. Those archived pages currently import 435 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.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:
v7out ofversionsArchived.jsonand back intoversions.json.versioned_docs/version-v7back 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/v7/should render. Worth spot checking an API page for its generated tables and playgrounds, and following a link from a v7 page into the CLI or plugin docs, since those are the links this PR repairs.