bep / docuapi

Beautiful multilingual API documentation theme for Hugo
https://docuapi.netlify.app/
Other
750 stars 200 forks source link

Bug - Same row.ids allocated to two different elements with same text #94

Closed roshanjonah closed 1 year ago

roshanjonah commented 1 year ago

Thanks for this great theme @bep

Two different .md files with different weights and content but the same heading are randomly allocated with the same row.id causing both of them to open their sub-menus simultaneously while scrolling. Please take a look at the photo below.

CleanShot 2023-04-14 at 16 20 47@2x

They both have the address - http://localhost:1313/#query-parameters-10

I've cleared the cache. I tried publishing to the online site - the issue remains.

bep commented 1 year ago

I suspect your're using a old version of the theme?

roshanjonah commented 1 year ago

@bep Downloaded it this morning :)

bep commented 1 year ago

OK, then I don't understand, because theres duplicate headings in the example site here:

https://docuapi.netlify.app/

There's code to detect this and increment a counter.

roshanjonah commented 1 year ago

Yup, quite strange. It works for almost all headings (also the same titles) except two that I caught, which it didn't increment for. It displays the same ID for them both. I just emailed you the link - not sure if that aids in debugging this.

bep commented 1 year ago

As a workaround you can assign the IDs manually in markdown, e.g.

## Query Parameters {#some-unique-id}