When I switched from using Wordpress to Hugo I thought I was giving up on search functionality on this blog. I just discovered recently I was wrong! After coming across the post Fast, keyboard optimized search for Hugo I saw that it can indeed be done. The trick to get Hugo to output a single
.json dictionary, index the data, and then provide search functionality to the user.
The screenshot below of the Network panel in the Chrome Developer Tools shows the time it takes to download the blog’s search dictionary (which is called
- Static HTML: https://github.com/gbmhunter/blog/blob/master/layouts/_default/baseof.html
- CSS: https://github.com/gbmhunter/blog/blob/master/static/css/style.css.
Other examples of static site search functionality can be found all over the web. Some examples include:
This work is licensed under a Creative Commons Attribution 4.0 International License .