aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-10-15 23:19:13 +0200
committerMirek Kratochvil <miroslav.kratochvil@uni.lu>2023-10-16 11:34:26 +0200
commit45a95ef439342b0b5d823ce5d476a22325dc7338 (patch)
treed89da99ddf65dbd80972674bc4ba0c47d88df506 /scripts
parent1f2ab58478925481d5cf273d38e30fc06e96e69e (diff)
downloadreploy-45a95ef439342b0b5d823ce5d476a22325dc7338.tar.gz
reploy-45a95ef439342b0b5d823ce5d476a22325dc7338.tar.bz2
switch title to name in search machinery
Diffstat (limited to 'scripts')
-rw-r--r--scripts/make-search-index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/make-search-index.js b/scripts/make-search-index.js
index f923b54..70df953 100644
--- a/scripts/make-search-index.js
+++ b/scripts/make-search-index.js
@@ -44,7 +44,7 @@ lunr.tokenizer.separator = /(\p{P}|\p{S}|\p{Z}|\p{C})+/u
var idx = lunr(function () {
this.ref('link')
- this.field('title', {boost: 9})
+ this.field('name', {boost: 9})
this.field('tag', {boost: 3})
this.field('text')
@@ -56,5 +56,5 @@ var idx = lunr(function () {
fs.writeFileSync(process.argv[3], JSON.stringify(idx), {encoding: 'utf8'})
fs.writeFileSync(process.argv[4], JSON.stringify(
- Object.fromEntries(documents.map(x => [x.link, {"title": x.title, "tags": x.tags}]))
+ Object.fromEntries(documents.map(x => [x.link, {"name": x.name, "tags": x.tags}]))
), {encoding: 'utf8'})