Skip to content

chore(api): generate heading IDs with MDX comment syntax - #4639

Merged
thetaPC merged 1 commit into
mainfrom
FW-6456-pt4
Aug 21, 2026
Merged

chore(api): generate heading IDs with MDX comment syntax#4639
thetaPC merged 1 commit into
mainfrom
FW-6456-pt4

Conversation

@thetaPC

@thetaPCthetaPC commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Issue URL: internal

What is the current behavior?

The component API plugin generates heading IDs using the classic {#my-id} syntax: spinner {#prop-spinner}

Docusaurus calls this "proprietary Docusaurus syntax, leading to ecosystem incompatibilities" and recommends the native MDX comment form instead.. We migrated our hand written docs off this syntax in #4628, but the plugin kept emitting it, so it comes back on every build. On main that is 1435 headings across 910 generated partials (1263 property headings, 172 method headings).

What is the new behavior?

The plugin emits the MDX comment form: spinner {/* #prop-spinner */}

Two lines change, one for properties and one for methods, which covers all 1435 headings. No other partial type is affected: events, parts, slots and custom-props contain tables rather than headings.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Part of the mdx migration.

No anchors change. Both syntaxes produce the same id, so #prop-spinner, #method-dismiss and every other API anchor continue to resolve.

How to test

Check that each heading renders its name only, with no visible {/* ... */} text, and that both the anchor link and the table of contents entry jump to it.

@vercel

vercelBot commented Aug 13, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
ionic-docsReadyReadyPreviewAug 13, 2026 9:47pm

Request Review

@thetaPC
thetaPC marked this pull request as ready for review August 13, 2026 21:59
@thetaPC
thetaPC requested a review from a team as a code ownerAugust 13, 2026 21:59
@thetaPC
thetaPC requested review from ShaneK and gnbm and removed request for gnbmAugust 13, 2026 21:59

@ShaneKShaneK 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.

LGTM!

@thetaPC
thetaPC merged commit b3a1b92 into mainAug 21, 2026
4 checks passed
@thetaPC
thetaPC deleted the FW-6456-pt4 branch August 21, 2026 22:09
Sign up for freeto 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

@thetaPC@ShaneK