easyops-cn

This commit is contained in:
caishi 2023-07-17 10:06:24 +08:00
parent bb30a0828b
commit 1496e752d0
1 changed files with 18 additions and 4 deletions

View File

@ -1,5 +1,6 @@
const lightCodeTheme = require('prism-react-renderer/themes/github'); const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula'); const darkCodeTheme = require('prism-react-renderer/themes/dracula');
import("@easyops-cn/docusaurus-search-local").PluginOptions;
/** @type {import('@docusaurus/types').DocusaurusConfig} */ /** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = { module.exports = {
@ -141,10 +142,23 @@ module.exports = {
}, },
], ],
], ],
plugins: [ themes: [
['@cmfcmf/docusaurus-search-local', { // ... Your other themes.
language:['en','zh'] [
}], require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
language: ["en", "zh"],
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
},
],
], ],
i18n: { i18n: {
defaultLocale: 'zh-cn', defaultLocale: 'zh-cn',