iris-hep / iris-hep.github.io

Institute for Research and Innovation in Software for High Energy Physics
http://iris-hep.org
30 stars 350 forks source link

Adding a search box for the website? #950

Open davidlange6 opened 3 years ago

davidlange6 commented 3 years ago

does anyone know an easy way to add a search box for the website?

henryiii commented 3 years ago

I see several options, probably depends on how you define "easy". Generally, you generate a file with all the searchable data, then use javascript to interface to it. https://learn.cloudcannon.com/jekyll/jekyll-search-using-lunr-js/ for example - https://github.com/christian-fei/Simple-Jekyll-Search also, but I think that's more blog posts (for us, news section) titles, whereas I assume we want (mostly page) content?

You could always do a google search with site:iris-hep.org added. ;) In fact, that's provided by Google here: https://support.google.com/programmable-search/answer/4513903. I think.

rct225 commented 3 years ago

@henryiii I found this too - https://community.algolia.com/jekyll-algolia/