import { defineConfig, HeadConfig } from 'vitepress'
+import { zhSearch } from './zh'
// TODO:
// export const META_IMAGE = 'https://router.vuejs.org/social.png'
text: 'Suggest changes',
},
- algolia: {
- appId: 'BTNTW3I1XP',
- apiKey: '771d10c8c5cc48f7922f15048b4d931c',
- indexName: 'next_router_vuejs',
+ search: {
+ provider: 'algolia',
+ options: {
+ appId: 'BTNTW3I1XP',
+ apiKey: '771d10c8c5cc48f7922f15048b4d931c',
+ indexName: 'next_router_vuejs',
+ locales: { ...zhSearch },
+ },
},
carbonAds: {
},
},
}
+
+export const zhSearch: DefaultTheme.AlgoliaSearchOptions['locales'] = {
+ zh: {
+ placeholder: '搜索文档',
+ translations: {
+ button: {
+ buttonText: '搜索文档',
+ buttonAriaLabel: '搜索文档',
+ },
+ modal: {
+ searchBox: {
+ resetButtonTitle: '清除查询条件',
+ resetButtonAriaLabel: '清除查询条件',
+ cancelButtonText: '取消',
+ cancelButtonAriaLabel: '取消',
+ },
+ startScreen: {
+ recentSearchesTitle: '搜索历史',
+ noRecentSearchesText: '没有搜索历史',
+ saveRecentSearchButtonTitle: '保存至搜索历史',
+ removeRecentSearchButtonTitle: '从搜索历史中移除',
+ favoriteSearchesTitle: '收藏',
+ removeFavoriteSearchButtonTitle: '从收藏中移除',
+ },
+ errorScreen: {
+ titleText: '无法获取结果',
+ helpText: '你可能需要检查你的网络连接',
+ },
+ footer: {
+ selectText: '选择',
+ navigateText: '切换',
+ closeText: '关闭',
+ searchByText: '搜索供应商',
+ },
+ noResultsScreen: {
+ noResultsText: '无法找到相关结果',
+ suggestedQueryText: '你可以尝试查询',
+ reportMissingResultsText: '你认为该查询应该有结果?',
+ reportMissingResultsLinkText: '点击反馈',
+ },
+ },
+ },
+ },
+}