Skip to main content
Version: 3.6.1

📦 theme-search-algolia

该主题提供了一个 @theme/SearchBar 组件,可以轻松与 Algolia DocSearch 集成。与 @docusaurus/theme-classic 结合,它提供了非常简单的搜索集成。你可以阅读有关 search 文档的更多信息。

¥This theme provides a @theme/SearchBar component that integrates with Algolia DocSearch easily. Combined with @docusaurus/theme-classic, it provides a very easy search integration. You can read more on search documentation.

npm install --save @docusaurus/theme-search-algolia

该主题还添加了 /search(作为可混合 SearchPage 组件)路径上可用的搜索页面,并支持 OpenSearch。你可以通过 themeConfig.algolia.searchPagePath 更改此默认路径。使用 false 禁用搜索页面。

¥This theme also adds search page available at /search (as swizzlable SearchPage component) path with OpenSearch support. You can change this default path via themeConfig.algolia.searchPagePath. Use false to disable search page.

提示

如果你已经安装了 @docusaurus/preset-classic,则无需将其安装为依赖。

¥If you have installed @docusaurus/preset-classic, you don't need to install it as a dependency.