Add a search bar in Jekyll blogsite

Posted by Bruce Liu on , updated on February 15, 2020

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: Remote desktop connection
    NEXT: A simple way to map landuse »