diff options
author | uvok cheetah | 2020-05-23 17:30:03 +0200 |
---|---|---|
committer | uvok cheetah | 2020-05-23 17:30:03 +0200 |
commit | 5231bb9a84d177948a5fde46a0d8e2cb7adcb7ea (patch) | |
tree | be32c102af732e10a85531dbc9bbd503db46831a /assets/js | |
parent | fd1004ff9bc4e30729a3be36d6bc7ad83518aac2 (diff) |
Make search return page instead of match
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/search.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/js/search.js b/assets/js/search.js index 8784541..8584810 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -26,5 +26,6 @@ var idx = lunr(function () { function do_search(queryterm) { - return idx.search(queryterm); + const result = idx.search(queryterm); + return result.map(r => pages.find((p) => p.id === r.ref)); } |