From 4191e046d8763bfd7323a637508e47e3c7823c18 Mon Sep 17 00:00:00 2001 From: Dillon Date: Fri, 1 May 2020 00:05:38 +0800 Subject: feat(search): improve search index by rm line number in code block (#294)) --- src/js/theme.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/js/theme.js b/src/js/theme.js index 51628a6..0f3bc00 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -238,7 +238,7 @@ class Theme { this._algoliaIndex .search(query, { offset: 0, - length: searchConfig.maxResultLength * 10, + length: searchConfig.maxResultLength * 5, attributesToHighlight: ['title'], attributesToSnippet: ['content:30'], highlightPreTag: `<${searchConfig.highlightTag}>`, @@ -637,7 +637,6 @@ class Theme { this._resizeTimeout = null; for (let event of this.resizeEventSet) event(); this.initToc(); - this.initSmoothScroll(); this.initMermaid(); this.initSearch(); }, 100); -- cgit v1.2.3