alanorth/hugo-theme-bootstrap4-blog

Add site search

alanorth opened this issue · 4 comments

Hugo 0.20 allows custom output formats such as JSON which can be fed to client-side search engines like Lunr.js to implement a search facility. See the hugo-theme-docdock theme for an example.

Here is an interesting article: https://www.stavros.io/posts/bloom-filter-search-engine/

Bloom filters provide a way to reduce the amount of data which has to be transferred initially with the side effect of having false positives.

another option is to have a search box that actually makes use of the google search engine: https://cse.google.com/cse/

I would not use a Google search box. I don't use Google for searching either and I don't have a Google account anymore.
A solution which doesn't send any data to some third party would be my favourite.

I ended up Making a Theme for my blog using Zola instead of Hugo. The hugo-theme-bootstrap4-blog theme which I used for a very long time was a big part of the inspiration for https://github.com/Jieiku/abridge it has search built in, you can try it out here: https://abridge.netlify.app/ (search for zola, then press enter or the search icon)