Skip to content

chore(docs): migrate admonition titles and heading IDs to MDX syntax - #4628

Merged
thetaPC merged 2 commits into
mainfrom
FW-6456-pt2
Aug 11, 2026
Merged

chore(docs): migrate admonition titles and heading IDs to MDX syntax#4628
thetaPC merged 2 commits into
mainfrom
FW-6456-pt2

Conversation

@thetaPC

@thetaPC thetaPC commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

We use two proprietary Docusaurus syntaxes that are being phased out:

  • Admonition titles use the space form, :::warning My Title. 43 occurrences across 38 files.
  • Heading IDs use the classic form, {#my-id}. 2 occurrences.

Neither is standard. Docusaurus calls both "proprietary Docusaurus syntax, leading to ecosystem incompatibilities" and recommends migrating:

Both only work today because of the MDX v1 compatibility shims in mdx-loader. On every build, preprocessContent() rewrites our files in memory before MDX ever parses them: admonitionTitleToDirectiveLabel() converts :::warning My Title to :::warning[My Title], and escapeMarkdownHeadingIds() escapes {#my-id} to \{#my-id} so MDX does not try to evaluate it as an expression.

Those shims are the markdown.mdx1Compat options, which Docusaurus v4 disables by default via future.v4.mdx1CompatDisabledByDefault.

Separately, troubleshooting/runtime.md has a malformed admonition where the closing ::: sits mid-sentence:

:::note
This flag is automatically included when creating an Ionic app via
:::
the Ionic CLI.

That renders as a note ending in "via", followed by an orphaned "the Ionic CLI." paragraph outside it. It dates back to at least v5.

What is the new behavior?

Both syntaxes are migrated to the standard forms, so the files no longer depend on the compat shims.

  • :::type My Title becomes :::type[My Title], the Markdown Directive syntax
  • {#my-id} becomes {/* #my-id */}, a native MDX comment

The malformed note is also repaired so the sentence stays intact inside the admonition.

40 files changed, +45/-45. Scope is limited to the live docs trees, docs/ and versioned_docs/version-v7. The archived v5 and v6 trees are deliberately untouched, since they are absent from versions.json and are served from standalone deployments rather than built from this repo.

Does this introduce a breaking change?

  • Yes
  • No

Other information

This is part of a series preparing the docs for the .md to .mdx migration.

How to test

Review the modified pages below and confirm each admonition still renders with its title and correct styling.

Two specific things to check on the runtime page:

  1. The zone.js note now reads as a single sentence inside the admonition, with no stray "the Ionic CLI." paragraph beneath it
  2. The custom anchor still resolves, since it is linked from the Framework component docs:
    https://ionic-docs-git-fw-6456-pt2-ionic1.vercel.app/docs/troubleshooting/runtime#accessing-this

Current (v8)

v7

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ionic-docs Ready Ready Preview Aug 10, 2026 6:37pm

Request Review

@thetaPC
thetaPC marked this pull request as ready for review August 10, 2026 18:11
@thetaPC
thetaPC requested a review from a team as a code owner August 10, 2026 18:11
@thetaPC
thetaPC requested a review from OS-jacobbell August 10, 2026 18:11

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@thetaPC
thetaPC merged commit 405f3dc into main Aug 11, 2026
4 checks passed
@thetaPC
thetaPC deleted the FW-6456-pt2 branch August 11, 2026 17:50
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.

2 participants