Skip to content

Commit 2141356

Browse files
authored
Merge pull request #40 from mongodb-developer/fixed-search-plugin
Fixed search plugin for Mandarin
2 parents 8e89e7b + 25dbf2e commit 2141356

File tree

3 files changed

+297
-2
lines changed

3 files changed

+297
-2
lines changed

docusaurus.config.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const config = {
9999
staticDirectories: ["static"],
100100
i18n: {
101101
defaultLocale: "en",
102-
locales: ["en", "zh"]
102+
locales: ["en", "zh"],
103103
},
104104
customFields: {
105105
startButtonTitle: `${startButtonTitle}`,
@@ -124,7 +124,14 @@ const config = {
124124
}),
125125
],
126126
],
127-
plugins: [require.resolve("docusaurus-lunr-search")],
127+
plugins: [
128+
[
129+
require.resolve("docusaurus-lunr-search"),
130+
{
131+
languages: ["en", "zh"], // language codes
132+
},
133+
],
134+
],
128135
themeConfig:
129136
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
130137
({

package-lock.json

+287
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@docusaurus/plugin-google-gtag": "3.5.2",
2121
"@docusaurus/preset-classic": "3.5.2",
2222
"@mdx-js/react": "3.0.1",
23+
"@node-rs/jieba": "^1.10.3",
2324
"clsx": "^1.2.1",
2425
"docusaurus-lunr-search": "^3.5.0",
2526
"prism-react-renderer": "^2.1.0",

0 commit comments

Comments
 (0)