Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make filters case-insensitive #737

Open
seezee opened this issue Nov 12, 2024 · 2 comments
Open

Make filters case-insensitive #737

seezee opened this issue Nov 12, 2024 · 2 comments

Comments

@seezee
Copy link

seezee commented Nov 12, 2024

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?

@bglw
Copy link
Contributor

bglw commented Nov 20, 2024

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?

@seezee
Copy link
Author

seezee commented Nov 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants