File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
packages/docusaurus-search-local/src/server Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ The following options are available (defaults are shown below):
73
73
//
74
74
// Do _not_ use Infinity, the value must be a JSON-serializable integer.
75
75
indexDocSidebarParentCategories: 0 ,
76
-
77
- // Includes parent categories path in search result
76
+
77
+ // Includes parent categories path in search result
78
78
includeParentCategoriesInPageTitle: true ,
79
79
80
80
// whether to index blog pages
Original file line number Diff line number Diff line change @@ -547,7 +547,9 @@ export const tokenize = (input) => lunr.tokenizer(input)
547
547
indexDocSidebarParentCategories > 0 &&
548
548
docSidebarParentCategories
549
549
) {
550
- const clonedDocSidebarParentCategories = [ ... docSidebarParentCategories ] ;
550
+ const clonedDocSidebarParentCategories = [
551
+ ...docSidebarParentCategories ,
552
+ ] ;
551
553
sidebarParentCategories = clonedDocSidebarParentCategories
552
554
. reverse ( )
553
555
. slice ( 0 , indexDocSidebarParentCategories )
@@ -577,16 +579,17 @@ export const tokenize = (input) => lunr.tokenizer(input)
577
579
type,
578
580
docSidebarParentCategories,
579
581
} ) : MyDocument => {
580
-
581
582
let fullTitle = pageTitle ;
582
583
583
584
if (
584
- includeParentCategoriesInPageTitle &&
585
- docSidebarParentCategories &&
586
- docSidebarParentCategories . length > 0
585
+ includeParentCategoriesInPageTitle &&
586
+ docSidebarParentCategories &&
587
+ docSidebarParentCategories . length > 0
587
588
) {
588
- fullTitle = docSidebarParentCategories
589
- . join ( ' > ' ) + ' > ' + pageTitle ;
589
+ fullTitle =
590
+ docSidebarParentCategories . join ( " > " ) +
591
+ " > " +
592
+ pageTitle ;
590
593
}
591
594
592
595
return {
@@ -595,7 +598,7 @@ export const tokenize = (input) => lunr.tokenizer(input)
595
598
sectionTitle,
596
599
sectionRoute,
597
600
type,
598
- }
601
+ } ;
599
602
}
600
603
) ,
601
604
index,
You can’t perform that action at this time.
0 commit comments