Skip to content

chore(i18n, scripts): generate CLI and native pages as .mdx - #4693

Open
thetaPC wants to merge 1 commit into
translation/jpfrom
FW-6456-pt7-jp
Open

chore(i18n, scripts): generate CLI and native pages as .mdx#4693
thetaPC wants to merge 1 commit into
translation/jpfrom
FW-6456-pt7-jp

Conversation

@thetaPC

@thetaPC thetaPC commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

Every doc page on this branch is now named .mdx except two directories: the CLI command pages and the Capacitor plugin pages, which are written by scripts/cli.mjs and scripts/native.mjs on every build and still land as .md.

These are pages, not fragments. They get routes, sidebar entries, and URLs like any other page, so the rule worth having is simply that doc pages are .mdx. Right now it is that doc pages are .mdx except two directories, and the exception is invisible: the output is gitignored, so it only shows up on a local disk after a build.

There is also a practical risk. If anyone adds an import or a component to those generator templates, the output breaks once Strict MDX is enabled, and the failure shows up as a blank section rather than an error.

What is the new behavior?

The two generators emit .mdx, and the 54 links pointing into those trees are updated to match.

That is the whole change: two lines in the generators, and 32 pages containing links to the pages they produce. Nothing is renamed in git, because the output is untracked. The old .md files disappear the next time the generators run.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Please merge this before the matching PR on main, not after.

The two are coupled, and the coupling is easy to miss. These generated pages are gitignored, so they are not in the tarball that scripts/i18n.sh builds from this branch. That means the Japanese production build resolves this branch's links to them against main's copies rather than any copy here. When main renames those files, these links break.

That was measured rather than assumed: building the Japanese locale with main's version of this change and this branch left unchanged produces 11 newly broken link targets, all resolving into native/ and cli/commands/. The build still exits 0, because onBrokenLinks is set to warn, so it would ship green with dead links.

Merging this branch first avoids that. A merge here does not trigger a production deploy, only a preview of this branch, so the Japanese site keeps serving its last good build until main next changes. By then both sides match. Merging main first breaks it immediately and with certainty.

Note that the extensionAlias entry does not help here. That covers imports, which webpack resolves, not markdown links, which Docusaurus resolves separately.

Verification, compared against a build taken before the change:

The build completes with 0 errors and the same 2326 pages. Broken links stay at 24 and broken anchors at 103, with none introduced. Prettier reports no differences and the spell checker reports none across 21,571 files. All 83 generated pages build and are reachable. There are now zero .md links and zero .md imports anywhere in docs or versioned_docs/version-v8.

How to test

Nothing should look different. These pages are generated from the same source data as before, so a failure shows up as a missing page or a dead link rather than as changed content.

Check that a CLI command page and a Capacitor plugin page still render, and that both appear in the sidebar in their usual positions.

Then follow a link into one of those trees from a hand-written page. The framework getting-started guides link to the Camera, Filesystem, and Preferences plugin pages, and the CLI configuration and livereload pages link to individual command pages. Those inbound links are the part this PR changes.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Sep 1, 2026 11:18pm UTC

Request Review

@thetaPC
thetaPC marked this pull request as ready for review September 1, 2026 23:23
@thetaPC
thetaPC requested a review from a team as a code owner September 1, 2026 23:23
@thetaPC
thetaPC requested review from ShaneK and removed request for a team September 1, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant