3 ms·
One I'm writing myself, but generating JSON for clientside search is actually fairly simple with most generators. Like this quick and easy Jekyll article [0][1
by shakna 9y ago
One I'm writing myself, but generating JSON for clientside search is actually fairly simple with most generators.
Like this quick and easy Jekyll article [0][1].
It all kinda depends how detailed you need your search engine to be. Fuzzy matching requires a little bit more JS. My go-to is lunr.js [2] to take care of all of that for me.
But basically all you need is a page that can iterate over all other pages that exist, (like a TOC would), and that can plug on the data into your search function for you.
[0] http://mathayward.com/jekyll-search/ http://mathayward.com/jekyll-search/
[1] https://github.com/mathaywarduk/jekyll-search https://github.com/mathaywarduk/jekyll-search
[2] https://lunrjs.com/docs/index.html https://lunrjs.com/docs/index.html