I was shocked how easy it was to add a browser-based search engine to this website using LunrJS and Hugo’s new content types. With a few small changes and less than 30 minutes of work, I had a great search engine up and running. I moved it under the menu and made it into a separate search page.
If you’re interested to mimic my approach, you can see the commit that I used1 to add the search page. I copy-pasted most of this code from articles here and here. Another article showing how to use LunrJS in a blog post is here.
If you use Hugo for your site, you can also get a theme that has LunrJS support. My theme, Story has it built-in and makes it very simple.
I’d like to express my appreciation to Swiftype for their excellent search engine, which I have now removed. I’ve used it for years and always loved their service. I still use it, and will continue doing so, for cases that require more robust capabilities.