Fix lunr errors
This commit is contained in:
parent
e4d0da4e56
commit
46ad15e877
@ -1,6 +1,7 @@
|
||||
const lunr = require('lunr');
|
||||
|
||||
fetch("/js/lunr/PagesIndex.json")
|
||||
.then(res => res.json())
|
||||
.then(pagesIndex => {
|
||||
const lunrIndex = lunr(function() {
|
||||
this.field('title', {
|
||||
@ -12,10 +13,10 @@ fetch("/js/lunr/PagesIndex.json")
|
||||
this.field('content');
|
||||
|
||||
this.ref('href');
|
||||
});
|
||||
|
||||
pagesIndex.forEach(page => {
|
||||
lunrIndex.add(page);
|
||||
pagesIndex.forEach(page => {
|
||||
this.add(page);
|
||||
});
|
||||
});
|
||||
})
|
||||
;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user