pagefind icon indicating copy to clipboard operation
pagefind copied to clipboard

Make filters case-insensitive

Open seezee opened this issue 1 year ago • 2 comments

Currently, if you have <span data-pagefind-filter="Garnish">mint</span> and <span data-pagefind-filter="Garnish">Mint</span>, this will produce two separate filters.

Can we make case-insensitive the default or have a configuration to toggle this behavior?

seezee avatar Nov 12 '24 16:11 seezee

It won't be the default, but happy to add configuration for this. It would likely take the form of something like --lowercase-filters supplied to the CLI, so both examples above would come through as mint.

The downside of this is that the UIs that grab the available filters from Pagefind will show mint instead of Mint, and will have to handle title-casing for display if required.

Thoughts?

bglw avatar Nov 20 '24 19:11 bglw

I think that's fine. One can always use CSS to transform filter results to title-case.

seezee avatar Nov 20 '24 19:11 seezee