diff --git a/docusaurus.config.js b/docusaurus.config.js index 4747d7f..2b141e1 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,5 +1,6 @@ const lightCodeTheme = require('prism-react-renderer/themes/github'); const darkCodeTheme = require('prism-react-renderer/themes/dracula'); +import("@easyops-cn/docusaurus-search-local").PluginOptions; /** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = { @@ -141,10 +142,23 @@ module.exports = { }, ], ], - plugins: [ - ['@cmfcmf/docusaurus-search-local', { - language:['en','zh'] - }], + themes: [ + // ... Your other themes. + [ + 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: { defaultLocale: 'zh-cn',