Skip to content

Commit

Permalink
feat: Add search box feature
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeZhangBorui committed Oct 30, 2024
1 parent 766802c commit 222d5a5
Show file tree
Hide file tree
Showing 3 changed files with 395 additions and 36 deletions.
15 changes: 14 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,20 @@ const config = {
theme: require('prism-react-renderer/themes/github'),
darkTheme: require('prism-react-renderer/themes/dracula')
}
}
},
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
({
hashed: true,
language: ["en", "zh"],
indexDocs: true,
docsRouteBasePath: ["/rules", "/manual", "/ula"],
indexBlog: false,
}),
],
],
};

module.exports = config;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"dependencies": {
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@easyops-cn/docusaurus-search-local": "^0.45.0",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"hast-util-is-element": "1.1.0",
Expand Down
Loading

0 comments on commit 222d5a5

Please sign in to comment.