diff options
author | Sarah German <sgerman@gitlab.com> | 2022-09-22 18:10:42 +0300 |
---|---|---|
committer | Kati Paizee <kpaizee@gitlab.com> | 2022-09-22 18:10:42 +0300 |
commit | 6ef828e917f82a7bd8a621c8a652e3127666ac37 (patch) | |
tree | 62b2f8c2f54d46bda3a58e8c45b1cad2e9777514 /scripts | |
parent | a5ac9d88bd1251c252d53680e8af0df0eef1d743 (diff) |
Add Lunr search UI components
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lunr/preindex.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lunr/preindex.js b/scripts/lunr/preindex.js index ffae7d8c..b883d9a0 100644 --- a/scripts/lunr/preindex.js +++ b/scripts/lunr/preindex.js @@ -5,8 +5,8 @@ * Creates data files required for Lunr search. * * This script creates two JSON files: - * - lunr-index.js: A serialized search index. - * - lunr-map.js: Maps index item IDs to their human-readable titles. + * - lunr-index.json: A serialized search index. + * - lunr-map.json: Maps index item IDs to their human-readable titles. * * @see https://lunrjs.com/guides/index_prebuilding.html */ @@ -68,7 +68,7 @@ buildIndex(htmlSrc, (err, filenames) => { if (title.length) { pages.push({ id: filename.slice(htmlSrc.length), - h1: title, + h1: title.trim(), h2: getText($, 'h2'), h3: getText($, 'h3'), }); |