From 6ef828e917f82a7bd8a621c8a652e3127666ac37 Mon Sep 17 00:00:00 2001 From: Sarah German Date: Thu, 22 Sep 2022 15:10:42 +0000 Subject: Add Lunr search UI components --- scripts/lunr/preindex.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') 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'), }); -- cgit v1.2.3