Skip to content

Commit 52024a7

Browse files
committed
adding search
1 parent 5f696ca commit 52024a7

File tree

5 files changed

+591
-4
lines changed

5 files changed

+591
-4
lines changed

docusaurus/docusaurus.config.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ const config: Config = {
5656
} satisfies Preset.Options,
5757
],
5858
],
59+
plugins: [
60+
[
61+
require.resolve('@easyops-cn/docusaurus-search-local'),
62+
{
63+
docsRouteBasePath: '/',
64+
indexBlog: false,
65+
hashed: true,
66+
language: ['en'],
67+
fuzzyMatchingDistance: 0,
68+
searchResultLimits: 8,
69+
searchResultContextMaxLength: 40,
70+
},
71+
],
72+
],
5973
themeConfig: {
6074
// Replace with your project's social card
6175
image: 'img/docusaurus-social-card.jpg',
@@ -80,7 +94,11 @@ const config: Config = {
8094
sidebarId: 'releaseNotesSidebar',
8195
position: 'left',
8296
label: 'Release notes',
83-
}
97+
},
98+
{
99+
type: 'search',
100+
position: 'right',
101+
},
84102
],
85103
},
86104
prism: {

0 commit comments

Comments
 (0)