diff options
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/search.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/assets/js/search.js b/assets/js/search.js index 68f56ff..1ddb264 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -15,8 +15,15 @@ const do_search = function() { {% endfor %} ]; + var mylunr = function (config) { + var builder = new lunr.Builder + // no pipeline + config.call(builder, builder) + return builder.build() + } + // index - const idx = lunr(function () { + const idx = mylunr(function () { this.ref('url'); this.field('title'); this.field('content'); |