How we can add a search bar in Jekyll website.
See these tutorials on search from CloudCannon: https://learn.cloudcannon.com/jekyll-search/
Here is an example of a super simple site-search (using Google):
<form method="get" action="http://www.google.com/search" target="_blank"> <input type="hidden" name="sitesearch" value="ibkc-carrosserie.nl" /> <input type="text" name="q" maxlength="255" placeholder="Search with Google" /> </form>
Note that the domainname needs to be changed (currently ‘ibkc-carrosserie.nl’). See the full code at: https://github.com/jhvanderschee/oocinfo/blob/master/_includes/footer.html. The live website can be found here: http://ibkc-carrosserie.nl/.
i have made a search feature for a Jekyll shop. using this method shown here
So, if we add the search bar on what basis it will show the search results?
On the basis of category or tags or keyword?
On build it will build an xml file to search… I used a bit of ymal call search terms
I have tried to add the search bar. But it didn’t go well.
Is there any other option?
Have you looked into Algolia?
There’s a Jekyll plugin to auto-sync data from a standard Jekyll blog (link).
If you’re doing more than a blog, a quick search on Github will pull up a number of results (including a few I’ve made over the years). I’d recommend starting with their instantsearch library.