How to Setup Search on Hugo

Setting up search on your static site built using Hugo or Jekyll is not as difficult as it sounds. If your static site is hosted on GitHub pages (which mine currently is), then you will not be able to use php or any server side scripting. Therefore, we must rely on a pure javascript solution. Using Lunr.js Lunr is a popular library used to parse through data and return the most accurate match based on a search query.