joeroe / risotto

A minimalist, responsive hugo theme inspired by terminal ricing aesthetics.
https://risotto.joeroe.io
MIT License
384 stars 109 forks source link

Search bar #74

Open kreatoo opened 2 months ago

kreatoo commented 2 months ago

Would be nice if there is a way to implement a search bar into this.

joeroe commented 2 months ago

There are several ways of adding search to a Hugo site listed here: https://gohugo.io/tools/search/

We could build one into the theme directly (making it optional, of course), but having never tried it myself I'm not sure which option to choose. It would also significantly complicate the instructions by adding an external dependency and an extra step in the build process. My gut instinct is this isn't worth it, but I'm open to being convinced...

kreatoo commented 2 months ago

There are several ways of adding search to a Hugo site listed here: https://gohugo.io/tools/search/

We could build one into the theme directly (making it optional, of course), but having never tried it myself I'm not sure which option to choose. It would also significantly complicate the instructions by adding an external dependency and an extra step in the build process. My gut instinct is this isn't worth it, but I'm open to being convinced...

Some themes like Hextra seem to be able to do it (using Flexsearch) without additional instructions. I don't know how they do it though.

I honestly think its worth it as it would make finding material easier, both in blogs and documentation type sites.