codygreen / lab-framework-demo

0 stars 5 forks source link

Duplicate header ids result in anchors not working #137

Closed aknot242 closed 3 weeks ago

aknot242 commented 3 weeks ago

Duplicate headers will not link. Need to find a durable way to add unique identifiers that aren't random every lab instance or refresh.

FYI, this plugin would be ideal, but the default unique id setting does not seem to work for me. Might be an MDXJS v2 issue: https://github.com/sindresorhus/remark-custom-header-id

aknot242 commented 3 weeks ago

@codygreen reopening, not resolved. Anchors having the same title are duplicates, so will not link correctly:

image

In the above page, each duplicate link results in #example, so there is no uniqueness. As a result, the browser doesn't know which one to scroll to.

codygreen commented 3 weeks ago

fixed in #152