Closed sean-clayton closed 3 months ago
I need this.
This Jekyll theme does offline search: https://just-the-docs.com
Under the hood is lunr.js: https://lunrjs.com
Should be able to build a json file during the build process. This should happen after contentlayer does its thing I think and piggyback off of that data.
Doing it on the server makes it possible to have a dedicated search page and server-rendered results without clogging up the client with a giant json file. Also makes it so JS isn't necessary to do a search if we use regular ol forms.
Two possible methods for the initial search: