How to implement a custom search for Hugo usig Gruntjs and Lunrjs.
Install the following tools:
I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.
Here is what I had messed up, which you also probably did:
//vanilla js version of https://gist.github.com/sebz/efddfc8fdcb6b480f567 | |
var lunrIndex, | |
$results, | |
pagesIndex; | |
// Initialize lunrjs using our generated index file | |
function initLunr() { | |
var request = new XMLHttpRequest(); | |
request.open('GET', 'js/lunr/index.json', true); |