docs icon indicating copy to clipboard operation
docs copied to clipboard

When two headings have the same name the anchor links always link to the first one

Open renebrandel opened this issue 2 years ago • 0 comments

Describe the bug

When a page has the same heading twice, we don't enumerate them (See how "Legacy" is both under ".signIn" and ".signUp"?) and if I click on any one after the first heading, it scrolls back to the first one. 5:19 In the previous doc, we used to have "#legacy-1" and "#legacy-2" etc. if there more than one to ensure uniqueness.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://docs.amplify.aws/react/build-a-backend/auth/auth-migration-guide/#legacy
  2. Click on "Legacy" under "Auth.signIn"
  3. Get scrolled to "Legacy" under "Auth.signUp"

Expected behavior

Expected: Scrolls to "Legacy" under "Auth.signIn"

Screenshots

https://github.com/aws-amplify/docs/assets/4989523/3550ee56-254f-48ba-8602-69768a19ded2

renebrandel avatar Jan 05 '24 22:01 renebrandel