Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue URL: internal
What is the current behavior?
A heading's anchor is derived from its text, so translating the heading silently moves the anchor and every English-authored link to it dies. One unpinned heading,
## Virtual Properties, is currently responsible for 103 broken anchors on the Japanese site. None of this shows up in review, because ja never builds in PR previews.The same applies in English whenever a heading is renamed. Nearly every broken anchor fixed in #4736 was a heading someone renamed years ago,
#text-alignmentto#text-alignand so on.Only 52 of the roughly 2,400 headings in
docs/carried an explicit id.What is the new behavior?
Every h2 through h6 in the current tree carries one, following Docusaurus's own docs and Vue, which both pin the id in the English source so a translation copies it verbatim.
docusaurus write-heading-ids --syntax mdx-commentrather than by hand.nativeand 109 incli/commands. Both scripts now callwriteMarkdownHeadingIdon the assembled content before writing, so generated pages follow the same rules instead of a second implementation that could drift.@docusaurus/utilspromoted from a transitive dependency to a declared one, matching how the repo already declares every other Docusaurus subpackage it imports. One line in the lockfile, no re-resolution.h1 headings are excluded by the tool itself, since Docusaurus generates no anchors for them.
Does this introduce a breaking change?
Other information
N/A