HUGO

A fast drop-in ready-to-use search solution for Hugo themes

Hi,

I started a little project for search functionality built on Fuse based on the Gist by Craig Mod. I realize this is definitely not the first time someone has proposed something like this, but I would like for you to have a look and tell me what you think. It’s still very much a work in progress, but you should be able to install it into your Hugo theme and try it out!

https://github.com/Theys96/hugo-fuse-search

It features three different search components with some extra options already implemented.

Preview

5 Likes

Does this option work by sending (uploading) json file to each visitor? At what size is json file considered to be too large?

Would be nice to have a configurable and user friendly solution.

I tried setting up tinysearch some time ago but it gave me “notenoughspace” error. Turns out it is actually a bug due to too large json files.

It does work by generating and index.json, that’s right.

Currently, the generation of this file is not implemented very sophisticatedly, and it includes the full page contents. So, it will grow quite large with more and larger pages. The generation script can be easily changed, though.
Just including the summary for this page rather than the full text would probably be a good option to add in.

The plan is to expand this project to have a lot of configuration options, but we need time.

1 Like

I’ve been using my theme component: https://github.com/kaushalmodi/hugo-search-fuse-js

@kaushalmodi Thank you!
The github page you refer to does not explain how to trigger the search
Does your solution use the same keyboard shortcuts? (which are unfortunately unusable out of Mac keyboards)

No, my solution doesn’t have any shortcut implementation. It just has a landing search page.

1 Like