oprypin / mkdocs-section-index

MkDocs plugin to allow clickable sections that lead to an index page
https://oprypin.github.io/mkdocs-section-index
MIT License
77 stars 8 forks source link

Plugin doesn't work properly with mkdocs-material 8.1.3 #10

Closed lyz-code closed 2 years ago

lyz-code commented 2 years ago

Hi, thanks for the awesome project :)

It looks like they changed how they manage the nav items and it broke the nav menu. The arrow is expanded down, but no elements are shown

oprypin commented 2 years ago

Thanks for the report. I confirm the bug and I have so far written a unittest that would've caught it.

lyz-code commented 2 years ago

Damn, so fast! thank you

oprypin commented 2 years ago

Hmm the fix is quite something... https://github.com/oprypin/mkdocs-section-index/commit/f43f39741223735f53615a78a9383d924fcaf6c5

https://github.com/squidfunk/mkdocs-material/commit/f3926bf444a29310be0d14b1311b3dd832b1c310#diff-fa37d36fb2ba3d0b185c0a8a05606472170b05c2bb97a2829bd8f3682c865252R113

nav_item was a completely different item from indexes | first but somehow != was returning False


The fix is released now.

lyz-code commented 2 years ago

Lol, looks like it was funny to catch xD.

Thanks again for the quick fix, I can confirm that it works now (~‾▿‾)~ ~(‾▿‾)~ ~(‾▿‾~)