emersonbottero / vitepress-plugin-search

Provide local search to your documentation site.
MIT License
238 stars 30 forks source link

Include all markdown heading levels in index #47

Closed pdanpdan closed 1 year ago

pdanpdan commented 1 year ago

Can you please replace #{2} with #{2,} so that subheadings are also included in the index?

https://github.com/emersonbottero/vitepress-plugin-search/blob/80a33d0e3c34e94abb73f3491233c97d7756f924/src/docs-builder.ts#L92

emersonbottero commented 1 year ago

would it make sense to get the data from outline option?

not so sure would be easy to create a regex for the available options tough.

pdanpdan commented 1 year ago

If you can get the max depth in outline then it would work. But i think all headings are converted to anchors, so it would make sense to index them

emersonbottero commented 1 year ago

fixed in https://github.com/emersonbottero/vitepress-plugin-search/pull/49

pdanpdan commented 1 year ago

Working as expected, thank you :)