-
Notifications
You must be signed in to change notification settings - Fork 388
Description
We are currently receiving [WARNING] Docusaurus found broken anchors! during our build process. This happens because Docusaurus automatically generates anchor IDs from the header text. When a header text changes, the ID changes, breaking any internal links pointing to the old ID.
To prevent this from happening in the future and to fix the current warnings, we need to assign explicit, fixed IDs to the headers referenced in links. This ensures that even if the title text is rewritten or translated, the anchor link remains stable.
The Goal
- Fix all broken anchor warnings in the English documentation by adding explicit IDs to the target headers.
- Including the update on the translations (Portuguese, French, Spanish, etc.)
How to Fix
- Locate the file containing the header that is being linked to.
- Find the specific header.
- Add a clear ID at the end of the header using the
{#custom-id}syntax.
Example:
If a link is pointing to #InstallPluginStep but the header is just ## Install Plugin, Docusaurus generates #install-plugin. The link breaks.
Change this:
## Install PluginTo this:
## Install Plugin {#Installpluginstep}By adding {#Installpluginstep}, the link pointing to that anchor will work regardless of the header text.
Acceptance Criteria
- All explicit IDs are added to the headers in the documentation files.
-
npm run build(or the equivalent Docusaurus build command) runs without "Broken anchor" warnings for the English pages. - No changes are made to translation files (these will be handled separately).
Screenshots
Build log showing the specific broken paths:
