summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNin32024-11-15 08:58:38 +0800
committerGitHub2024-11-15 08:58:38 +0800
commit7f6fd54b5b6a582145bb62372fc08c213f318a9c (patch)
tree72541115b1232b76186fd3b2da7ad33a590c4b99
parenta4a96674c336c493b383d396aaeb1739009ff7b9 (diff)
downloadIT.starlight-7f6fd54b5b6a582145bb62372fc08c213f318a9c.tar.gz
IT.starlight-7f6fd54b5b6a582145bb62372fc08c213f318a9c.tar.bz2
IT.starlight-7f6fd54b5b6a582145bb62372fc08c213f318a9c.zip
i18n(zh-cn): Update `site-search.mdx` (#2604)
-rw-r--r--docs/src/content/docs/zh-cn/guides/site-search.mdx9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/src/content/docs/zh-cn/guides/site-search.mdx b/docs/src/content/docs/zh-cn/guides/site-search.mdx
index 8ae1816a..800226d8 100644
--- a/docs/src/content/docs/zh-cn/guides/site-search.mdx
+++ b/docs/src/content/docs/zh-cn/guides/site-search.mdx
@@ -108,6 +108,15 @@ title: 部分索引的页面
像这样更新配置后,你站点上的搜索栏将会打开一个 Algolia 的模态框而不是默认的搜索模态框。
+#### DocSearch 配置
+
+Starlight DocSearch 插件还支持通过下面这些附加的选项来自定义 DocSearch 组件:
+
+- `maxResultsPerGroup`:限制每个搜索组所显示的结果数。默认值为 `5`。
+- `disableUserPersonalization`:阻止 DocSearch 将用户的最近搜索和收藏夹保存到本地存储。默认值为 `false`。
+- `insights`:启用 Algolia Insights 插件并将搜索事件发送到你的 DocSearch 索引。默认值为 `false`。
+- `searchParameters`:一个可用于自定义 [Algolia 搜索参数](https://www.algolia.com/doc/api-reference/search-api-parameters/)的对象。
+
#### 翻译 DocSearch UI
DocSearch 默认只提供了英语 UI 文本。