seanlane / gochowdown

Hugo theme based on the Jekyll chowdown theme
MIT License
71 stars 51 forks source link

Search to filter recipes #17

Open seanlane opened 3 years ago

seanlane commented 3 years ago

Add a search box to filter recipes on the page.

https://gohugo.io/tools/search/

Tiliavir commented 3 years ago

Hi @seanlane

I have implemented a lunr search in another project. This is my search page that bind everything together: https://github.com/Tiliavir/mvw-website/blob/master/content/suche.md And this is required for index creation: https://github.com/Tiliavir/mvw-website/blob/master/package.json#L44

mvw-search-index is a small project I wrote years ago to create a lunr index from a static set of HTML pages. Index creation is therefore working on the build directory post-build and writing the index.json to the same directory.

Best regards Markus

Tiliavir commented 3 years ago

Hi @seanlane

First I was thinking about adding a dedicated search page with a input field and a result set listing matches. But then on second thought i recognized that it might be sufficient and more convenient for users to have a simple JavaScript filter on the landing page filtering by title?

What are your expectations?

Best regards Markus