Implementing simple Jekyll search
There are numerous methods for incorporating search into your Jekyll website. Some of them are difficult to implement, but others are simple. One such tool is Simple Jekyll Search. It is very simple to incorporate into your Jekyll website. If you want you can go for:
- Google search
In the subsequent articles, we’ll go over how to use different search engines. In this blog, I’ll show you how to use a Jekyll search plugin to construct a simple Jekyll search functionality.
- Light weight
- Displays instant search results
- Easy to implement
- Easy debugging process
- A json file, for example, search.json.
- HTML elements for search bar, for example, search.html.
- Add search.json at your home location. The location where you have your index.html file.
- Add search-script.js in your js folder if you have one, otherwise add it at your home location.
Add search.html in your
_includesfolder.Note: Update the search.html file with the exact location of search.json and search-script.js files.
- Add search.html at the location where you want your system to display the search bar or functionality.
Credits and references
- christian-fei for developing Simple Jekyll Search.
- Alex Pearce for the idea on how it can be achieved.
search-script.jsfile to customize the search as per your needs.
If you have questions, let me know in the comments section.