pagefind icon indicating copy to clipboard operation
pagefind copied to clipboard

Support file exclusion when using addDirectory

Open maple3142 opened this issue 11 months ago • 1 comments

Currently the addDirectory api only support matching files via glob, which is based on wax. But it does not support exclusion currently so there is no easy way to say "match all html in this directory except these". So it would be good to have an additional option to exclude file in some way (regex, js callback, etc...).

This feature would be useful for astro-pagefind: https://github.com/shishkin/astro-pagefind/issues/104#issuecomment-2742158563

maple3142 avatar Mar 22 '25 06:03 maple3142

Good call — I don't see why this can't be done. The blast radius might be slightly larger in getting exclusions spread through the codebase, but the main CLI has also been needing better globbing for a while so it makes sense.

bglw avatar Mar 26 '25 02:03 bglw