The commonly used method for implementing search capability in jekyll site with lunr does not seem to be working specifically in my case (namely the current website that we are staring at now). Trying to Google a bit and tring a few suggested solutions such as changing the version of jekyll, etc., and still the issue is there. Coming across the Ref. [1], there are listed three options to encode the search capability in jekyll site – the lunr method is the first one in the list. It seems the third option going through Google is working properly.

  • We need to go to Ref. [2] to create a new search engine for our site. We need to specify a name for the search engine and put in our domain name (that we the Google search engine to search from). That’s it.

  • Clicking on Create there, we will be prompted with a short piece of javascript code which we then need to copy and paste into, e.g., _includes/search_google.html. Then we need to edit the search.html file to include that file, like this { % include search-google.html % }.

    Refer to Ref. [3] (the github page repo for current blog) for code structure which the above instructions is based on.

  • Here follows is the piece of code implemented for current website,

<script async src="">
<div class="gcse-search"></div>