Skip to content

chore(v8): pin an explicit id on every v8 heading - #4832

Merged
thetaPC merged 1 commit into
mainfrom
v8-heading-ids
Nov 17, 2026
Merged

thetaPC merged 1 commit into
mainfrom
v8-heading-ids

Conversation

@thetaPC

@thetaPC thetaPC commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Issue URL: N/A

What is the current behavior?

v9 pins an explicit id on every heading (#4742), but v8 doesn't. Renaming a v8 heading changes its anchor and breaks any link pointing at it.

What is the new behavior?

  • 2,249 headings across 222 files in versioned_docs/version-v8 now have an explicit id. The generated native/ and cli/commands/ pages are skipped, the same as in docs/
  • Every anchor stays the same, because each id is generated from the heading's current text
  • Of the 2,225 v8 headings that also exist in v9, all have the same id as their v9 counterpart. The other 25 are v8-only content: picker-legacy, the Protractor testing sections, and React Router 5 navigation

Does this introduce a breaking change?

  • Yes
  • No

Other information

Merge after #4831. Pinning would put {/ #id /} in the meta description of 6 v8 pages, and #4831 adds a description to those pages to prevent that.

CI still checks heading ids in docs/ only. v8 is being phased out, so new v8 headings won't fail the build without an id.

@vercel

vercel Bot commented Nov 5, 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 Nov 5, 2026 3:50am UTC

Request Review

@thetaPC
thetaPC marked this pull request as ready for review November 5, 2026 04:02
@thetaPC
thetaPC requested a review from a team as a code owner November 5, 2026 04:02
@thetaPC
thetaPC requested a review from ShaneK November 5, 2026 04:02

@brandyscarney brandyscarney 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!

Optional: CI only checks docs/ for missing ids, so a new or renamed v8 heading could go unpinned without anyone noticing. We could add v8 to the heading-ids script with the same exclusions:

"versioned_docs/version-v8/**/*.mdx" "!versioned_docs/version-v8/native/**" "!versioned_docs/version-v8/cli/commands/**"

and change the CI check to git diff --quiet -- docs versioned_docs/version-v8. This could go here or in a follow-up, if you want to add it.

@thetaPC

thetaPC commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@brandyscarney Thanks! I'm going to leave v8 out of the check on purpose. v8 is being phased out and new content goes to v9, so I'd rather not add CI gates to it. This PR pins what's there today, and any new v8 heading can be pinned by hand when it comes up.

@thetaPC
thetaPC merged commit a799187 into main Nov 17, 2026
7 checks passed
@thetaPC
thetaPC deleted the v8-heading-ids branch November 17, 2026 18:24

This branch was successfully deployed

1 active deployment
Preview — dc1f855e Deployed Nov 5, 2026 by vercel[bot]
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