Skip to content

Instantly share code, notes, and snippets.

View alistaircom's full-sized avatar
💭
Writing code for fun rather than profit

Alistair Calder alistaircom

💭
Writing code for fun rather than profit
View GitHub Profile
@naile
naile / search.js
Created February 3, 2019 20:55
search.js
//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);
@sebz
sebz / grunt-hugo-lunrjs.md
Last active April 29, 2024 16:44
hugo + gruntjs + lunrjs = <3 search