zh.ts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
  2. export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
  3. themeConfig: {
  4. editLink: {
  5. pattern: 'https://github.com/tresjs/tres/edit/main/docs/:path',
  6. text: '对本页内容给出建议',
  7. },
  8. sidebar: [
  9. {
  10. text: '使用指南',
  11. items: [
  12. { text: '简介', link: '/zh/guide/' },
  13. { text: '入门指南', link: '/zh/guide/getting-started' },
  14. { text: '你的第一个场景', link: '/zh/guide/your-first-scene' },
  15. { text: 'Nuxt', link: '/zh/guide/nuxt' },
  16. { text: '故障排除', link: '/zh/guide/troubleshooting' },
  17. { text: '从 v1 迁移', link: '/zh/guide/migration-guide' },
  18. ],
  19. },
  20. {
  21. text: 'API',
  22. items: [
  23. { text: 'TresCanvas', link: '/zh/api/tres-canvas' },
  24. {
  25. text: '实例, 参数和 props',
  26. link: '/zh/api/instances-arguments-and-props',
  27. },
  28. {
  29. text: '组合式函数',
  30. link: '/zh/api/composables',
  31. },
  32. {
  33. text: '事件',
  34. link: '/zh/api/events',
  35. },
  36. ],
  37. },
  38. {
  39. text: '进阶',
  40. items: [
  41. { text: '扩展', link: '/zh/advanced/extending' },
  42. { text: '原语', link: '/zh/advanced/primitive' },
  43. {
  44. text: '注意事项',
  45. link: '/zh/advanced/caveats',
  46. },
  47. ],
  48. },
  49. {
  50. text: 'Debug',
  51. items: [
  52. { text: 'Devtools', link: '/zh/debug/devtools' },
  53. ],
  54. },
  55. {
  56. text: '专题手册 🍳🧑‍🍳',
  57. link: '/zh/cookbook/',
  58. items: [
  59. { text: '轨道控制器', link: '/zh/cookbook/orbit-controls' },
  60. { text: '基础动画', link: '/zh/cookbook/basic-animations' },
  61. { text: '组', link: '/zh/cookbook/groups' },
  62. { text: '加载纹理', link: '/zh/cookbook/load-textures' },
  63. { text: '加载模型', link: '/zh/cookbook/load-models' },
  64. { text: '加载文本', link: '/zh/cookbook/text-3d' },
  65. { text: '光照和阴影', link: '/zh/cookbook/lights-shadows' },
  66. { text: '着色器', link: '/zh/cookbook/shaders' },
  67. ],
  68. },
  69. {
  70. text: '指令',
  71. collapsed: true,
  72. items: [
  73. { text: 'v-log', link: '/zh/directives/v-log' },
  74. { text: 'v-light-helper', link: '/zh/directives/v-light-helper' },
  75. { text: 'v-distance-to', link: '/zh/directives/v-distance-to' },
  76. ],
  77. },
  78. {
  79. text: '生态系统',
  80. items: [
  81. {
  82. text: 'Cientos 💛',
  83. link: 'https://cientos.tresjs.org/',
  84. },
  85. {
  86. text: 'Nuxt module',
  87. link: 'https://github.com/Tresjs/nuxt',
  88. },
  89. {
  90. text: 'TresLeches 🍰',
  91. link: 'https://tresleches.tresjs.org/',
  92. },
  93. {
  94. text: 'Post-processing',
  95. link: 'https://post-processing.tresjs.org/',
  96. },
  97. ],
  98. },
  99. ],
  100. nav: [
  101. { text: '使用指南', link: '/zh/guide/' },
  102. { text: 'API', link: '/zh/api/tres-canvas' },
  103. /* { text: 'API', link: '/api/' },
  104. { text: 'Config', link: '/config/' }, */
  105. {
  106. text: '资源',
  107. items: [
  108. { text: '团队', link: '/zh/team' },
  109. { text: '版本发布', link: 'https://github.com/Tresjs/tres/releases' },
  110. {
  111. text: '演练场',
  112. link: 'https://play.tresjs.org/',
  113. },
  114. {
  115. text: 'Github',
  116. link: 'https://github.com/Tresjs/tres/',
  117. },
  118. {
  119. text: '议题',
  120. link: 'https://github.com/Tresjs/tres/issues',
  121. },
  122. {
  123. text: '生态系统',
  124. items: [
  125. {
  126. text: 'Cientos 💛',
  127. link: 'https://cientos.tresjs.org/',
  128. },
  129. {
  130. text: 'Nuxt 模块',
  131. link: 'https://github.com/Tresjs/nuxt',
  132. },
  133. {
  134. text: 'TresLeches 🍰',
  135. link: 'https://tresleches.tresjs.org/',
  136. },
  137. {
  138. text: 'Post-processing',
  139. link: 'https://post-processing.tresjs.org/',
  140. },
  141. ],
  142. },
  143. ],
  144. },
  145. ],
  146. search: {
  147. provider: 'local',
  148. options: {
  149. locales: {
  150. zh: {
  151. translations: {
  152. button: {
  153. buttonText: '搜索',
  154. buttonAriaLabel: '搜索',
  155. },
  156. modal: {
  157. displayDetails: '显示详细列表',
  158. resetButtonTitle: '重制搜索',
  159. backButtonTitle: '关闭搜索',
  160. noResultsText: '没有找到相关结果',
  161. footer: {
  162. selectText: '选择',
  163. selectKeyAriaLabel: 'enter',
  164. navigateText: '切换',
  165. navigateUpKeyAriaLabel: '上方向键',
  166. navigateDownKeyAriaLabel: '下方向键',
  167. closeText: '关闭',
  168. closeKeyAriaLabel: 'esc',
  169. },
  170. },
  171. },
  172. },
  173. },
  174. },
  175. },
  176. darkModeSwitchLabel: '外观',
  177. sidebarMenuLabel: '菜单',
  178. returnToTopLabel: '返回顶部',
  179. langMenuLabel: '更改语言',
  180. lastUpdatedText: '最近更新',
  181. outlineTitle: '此页面上',
  182. docFooter: {
  183. next: '下一页',
  184. prev: '上一页',
  185. },
  186. },
  187. }