Skip to content

Commit 913f99b

Browse files
authored
Merge pull request #35 from bohyunjung/add-local-search
Add local search
2 parents 353c41a + 9c14fde commit 913f99b

File tree

3 files changed

+10941
-14854
lines changed

3 files changed

+10941
-14854
lines changed

docusaurus.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,21 @@ const config: Config = {
263263
} satisfies DocsOptions,
264264
]
265265
],
266+
themes: [
267+
[
268+
require.resolve("@easyops-cn/docusaurus-search-local"),
269+
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
270+
({
271+
indexDocs: true,
272+
indexBlog: false,
273+
indexPages: true,
274+
docsRouteBasePath: ["knowledge", "contributing"],
275+
hashed: true,
276+
docsDir: ["docs", "contributing"],
277+
highlightSearchTermsOnTargetPage: true,
278+
}),
279+
],
280+
],
266281
webpack: {
267282
jsLoader: (isServer: boolean) => ({
268283
loader: 'swc-loader',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@docusaurus/theme-classic": "^3.3.2",
2424
"@docusaurus/theme-common": "^3.3.2",
2525
"@docusaurus/utils": "^3.3.2",
26+
"@easyops-cn/docusaurus-search-local": "^0.44.4",
2627
"@fortawesome/fontawesome-svg-core": "^6.5.2",
2728
"@fortawesome/free-brands-svg-icons": "^6.5.2",
2829
"@fortawesome/free-regular-svg-icons": "^6.5.2",

0 commit comments

Comments
 (0)