vuepress-plugin-fulltext-search
vuepress-plugin-fulltext-search copied to clipboard
Understand the top category
Thanks for this great plugin ! Really better than the default one, and since I don't want to use a third party search engine, it fill all my need.
Just a case I don't understand : I used it here : https://kestra.io/ and source code is here : https://github.com/kestra-io/kestra.io
I have a structure with folder, subfolder and 2 side bar : https://github.com/kestra-io/kestra.io/blob/master/.vuepress/config.js#L38
For examples this page : https://kestra.io/docs/developer-guide/errors-handling/
When I search for some content on this page :
The top navbar is always showing the index of the side bat when I hope to show the previous page developer-guide.
- Is this a normal behavior ?
- Is there any way to customize this behavior and to choose the level we want ?
Thanks
Issue is here:
https://github.com/leo-buneev/vuepress-plugin-fulltext-search/blob/master/services/flexsearchSvc.js#L107
The idea is to show "top-most" category, and plugin does that by finding document corresponding to first path slice for each page.
On your website there are 2 top-level paths: /docs/
(with title "What’s Kestra?") and /plugins/
(with title "Overview").
I think it's reasonable default behaviour, but I agree that on your website lower level may look better.
Feel free to create PR ( for example, add setting "topCategoryLevel"), or I'll do it myself when I'll have free time (in a week or 2, sorry).