gridsome-plugin-flexsearch
gridsome-plugin-flexsearch copied to clipboard
Support callback function or regex in autoFetch
Hi,
Thanks for the awesome plugin.
I have a use case where the search component is shared in multiple pages (e.g. /docs/my-help-article-1...)
I checked https://github.com/thetre97/gridsome-plugin-flexsearch/blob/main/gridsome.client.js#L67 and it seems like the autoFetch
is being "hard checked".
So my suggestion is to support a callback function or regex or prefix (e.g. "/docs/*").
Cheers,
Hey @louis-l - good suggestion. Feel free to create a PR, or I will work on this when I get a chance.
@thetre97
Here you go: https://github.com/thetre97/gridsome-plugin-flexsearch/pull/76