Skip to content

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

Open
thetaPC wants to merge 1 commit into
mainfrom
FW-6456-pt4
Open

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

Conversation

@thetaPC

@thetaPC thetaPC 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

vercel Bot commented Aug 13, 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 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 owner August 13, 2026 21:59
@thetaPC
thetaPC requested review from ShaneK and gnbm and removed request for gnbm August 13, 2026 21:59

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

LGTM!

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