praveenn77 / docusaurus-lunr-search

Local / Offline Search for docusaurus
https://praveenn77.github.io/docusaurus-lunr-search-demo/
MIT License
493 stars 79 forks source link

Further develop the `data-search-children` functionality #117

Closed Jeandcc closed 1 year ago

Jeandcc commented 1 year ago

This PR aims at improving the features added in this commit.

The initial implementation worked by indexing only the immediate children of the element that had the data-search-children attribute. This PR builds on top of that behavior, and now indexes all heading elements under that element with the attribute, not mattering if they are direct or indirect children (E.g. children/grandchildren).

Alongside the code that handles the main purpose of this PR, this PR contains: