Use search.provider: lunr in _config.yml to enable Lunr.js. The index
is built with your site. See the Lunr.js demo.
Configure the provider and page
Follow Enable local search.
Use provider: lunr in that example and keep your existing search URL.
Publish and verify
Follow Check a result to test the published index. See the search reference for word limits and attribution.