easyops-cn / docusaurus-search-local

Offline/local search for Docusaurus v2/v3
https://easyops-cn.github.io/docusaurus-search-local/
MIT License
712 stars 90 forks source link

Include headers from h4 and beyond in the search index as tokens #437

Open jgjfuture opened 4 months ago

jgjfuture commented 4 months ago

In the documentation we are currently developing, there are important sections marked with h4 headers that we want to access directly through search. These headers are generated by a document generation tool, and it is natural for them to be structured as h4, so we are not considering changing the tool at the moment.

It seems that only headers up to h3 are tokenized during the parsing of the documentation, and h4 headers do not appear as section content in search results. It would be helpful if this could be made configurable, allowing headers of any level to be tokenized.