Hi All —
To see it in action, go to craigmod.com and press
CMD-/ and start typing.
I believe Fast Software is the Best Software and built this with that in mind. This method was highly inspired by Sublime Text’s CMD-P/CMD-shift-P method of opening files / using functions.
The core precepts of this exploration were:
- Minimal / zero external dependencies (no jQuery)
- Smallest possible size added to each page
- json index only delivered when needed (further minimizing overall impact on page speed / user experience)
- Keyboard friendly, instant navigation (ala Alfred / macOS Spotlight)
As Eddie Webb points out, this method has the additional benefits of:
- No NPM, grunt, etc
- No additional build time steps, just
hugoas you would normally
- Easy to swap out choice of client side search tools, anything that can use a json index
Hope you find this as useful as I do.
Thanks to everyone for the great software and community.