Skip to content

Commit e7e7024

Browse files
authored
Use docusaurus-search-local plugin (#255)
Signed-off-by: Christian Berendt <berendt@osism.tech>
1 parent 89cf0a5 commit e7e7024

File tree

3 files changed

+1475
-2040
lines changed

3 files changed

+1475
-2040
lines changed

docusaurus.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@ const config = {
123123
darkTheme: darkCodeTheme,
124124
},
125125
}),
126+
themes: [
127+
[
128+
require.resolve("@easyops-cn/docusaurus-search-local"),
129+
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
130+
({
131+
// ... Your options.
132+
// `hashed` is recommended as long-term-cache of index file is possible.
133+
hashed: true,
134+
// For Docs using Chinese, The `language` is recommended to set to:
135+
// ```
136+
// language: ["en", "zh"],
137+
// ```
138+
}),
139+
],
140+
],
126141
};
127142

128143
module.exports = config;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"dependencies": {
1717
"@docusaurus/core": "^3.0.1",
1818
"@docusaurus/preset-classic": "^3.0.1",
19+
"@easyops-cn/docusaurus-search-local": "^0.39.0",
1920
"@mdx-js/react": "^3.0.0",
2021
"clsx": "^1.2.1",
2122
"prism-react-renderer": "^2.1.0",

0 commit comments

Comments
 (0)