Add a search bar in Jekyll blogsite

Posted by Bruce Liu on February 15, 2020 , updated on December 6, 2021

Christian’s Simple-Jekyll-Search

  • Find the guide here.

Lunr

  • Add Lunr.js to your project.

  • Add search-lunr.html to _includes of your project

  • Add the following statement to your page

    { % include search-lunr.html % }
    

    Google - invoke google.com

    • Add search-google.html to _includes of your project

    • Change the domain name with yours

    • Add the following statement to your page

      { % include search-google.html % }
      

    Google Custom Search Engine

    • Create a new search engine for your site https://cse.google.com/cse/create/new.

    • Add the following

      <script async src="put your public url here"></script><div class="gcse-search"></div>
      

    Reference:


    Share on:

    « PREVIOUS: Colon, double colon and ellipsis
    NEXT: Academic journals on climate change »