Skip to content

Commit

Permalink
Update search options to use Algolia search in zh.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Leetfs committed Sep 8, 2024
1 parent baa6378 commit 8acce1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const shared = defineConfig({
socialLinks: [{ icon: 'github', link: 'https://github.com/Leetfs/study' }],

search: {
provider: 'local', //改为algolia即为使用algolia搜索
provider: 'local', //当前为本地搜索,改为algolia即为使用algolia搜索
//这里放密钥
options: {
appId: '8J64VVRP8K',
Expand Down
22 changes: 11 additions & 11 deletions src/client/theme-default/components/VPLocalSearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -342,18 +342,18 @@ onKeyStroke('Escape', () => {
// Translations
const defaultTranslations: { modal: ModalTranslations } = {
modal: {
displayDetails: 'Display detailed list',
resetButtonTitle: 'Reset search',
backButtonTitle: 'Close search',
noResultsText: 'No results for',
displayDetails: '显示详细列表',
resetButtonTitle: '重置',
backButtonTitle: '关闭',
noResultsText: '未找到相关的结果',
footer: {
selectText: 'to select',
selectKeyAriaLabel: 'enter',
navigateText: 'to navigate',
navigateUpKeyAriaLabel: 'up arrow',
navigateDownKeyAriaLabel: 'down arrow',
closeText: 'to close',
closeKeyAriaLabel: 'escape'
selectText: '选择',
selectKeyAriaLabel: '回车',
navigateText: '切换',
navigateUpKeyAriaLabel: '上箭头',
navigateDownKeyAriaLabel: '下箭头',
closeText: '关闭',
closeKeyAriaLabel: '退出'
}
}
}
Expand Down

0 comments on commit 8acce1b

Please sign in to comment.