-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
🚀 Feature
There are 2 usecases for letting user choose its own anchor ids instead of generating them from text.
The i18n process. If a translator translate the heading of a doc, the auto generated ids will change, which means that incoming anchor links from all the other places will break, and this can be annoying. See also the section on i18n RFC: #3317
Related links:
reactjs/react.dev#1605 (comment)
reactjs/react.dev#1605 (comment)
ethereum/ethereum-org-website#272
https://github.com/reactjs/reactjs.org/pull/1636/files
mdx-js/mdx#810
Unfortunately there's no special syntax in MD/MDX that allows to pass additional metadata to headings that we could use to generate anchor links
We should probably create a remark plugin that enables us to set explicit ids to each heading, so that they become "stable".
Also related to the ability to detect broken anchor links: #3321