My Hugo Journey

HOME

Hugo Search

After trying them all I decided to use…

Google Custom Search https://developers.google.com/custom-search

Many Hugo users employ Google Custom Search. But it contains ads (in the free edition).

<div class="search_bar"> <form> <input type="search" placeholder ="Search..." value="" name="q" title="Search for:"> <input type="hidden" name="sitesearch" value="andrew9.com"> </form> </div> <div> <script async src="https://cse.google.com/cse.js?cx=004607284084294698035:emxfsk01h87"></script> <div class="gcse-searchresults-only"></div> </div>

.search_bar{ overflow: hidden; background-color: #fff; margin:0px 0px 0px 12px;width:320px;}

/* Style the search box inside the navigation bar */ .search_bar input[type=search] { padding: 4px; border: 1px dotted black; font-size:22px; width:320px;}