Best way to add a search/filter box to page content in Kirby?

Hi everyone,

I’m looking for an easy way to integrate a search box on specific pages of my Kirby site — ideally, it would filter the page content live and display only matching results, like a content filter.

I’m not a programmer, so I’m looking for a simple solution or a plugin that doesn’t require heavy custom coding.

I’ve checked the Kirby cookbook and tutorials, but couldn’t find anything directly related to this use case.

Does anyone know of a good plugin or a recommended approach to achieve this?

Thanks a lot for your help!

Search is built-in to Kirby, but whether or not native search is sufficient for your use case depends on what you expect to see as result. Basically, Kirby’s native search executes its search in the content files (which can be limited to certain fields though), not the rendered pages. This might or might not be the same.

Plugins:

Algolia DocSearch | Kirby CMS Plugins (uses a third party product)
Better Search | Kirby CMS Plugins (extended Kirby search)

It would be helpful if you can elaborate some more what exactly it is that you want to achieve.

Hi there!

Thanks again for always being there to lend a hand — it’s truly appreciated.

I’m looking to create a live filter for this page: Échelles standardisées — Steve Forest, pratique infirmière en santé mentale.

The page is quite long and contains many valuable tools. I’ve added anchor links to make navigation easier, but it’s still not ideal in terms of accessibility. Currently, the search function loads a separate results page, which isn’t what I want.

Ideally, I’d like a solution where, as the user types — for example, “Global Assessment of Functioning” or “GAF” — the page dynamically filters and directly brings them to the relevant section, without leaving or reloading the page.

I think Algolia would be a solution, but using a third party product is never my first choice…

Hope it helps.

In that case, I’d go with some JavaScript solution to do in page search and hide/reveal relevant section or jump to it.