en.mts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. import type { DefaultTheme } from 'vitepress';
  2. import { defineConfig } from 'vitepress';
  3. import { version } from '../../../package.json';
  4. export const en = defineConfig({
  5. description: 'Vben Admin & Enterprise level management system framework',
  6. lang: 'en-US',
  7. themeConfig: {
  8. darkModeSwitchLabel: 'Theme',
  9. darkModeSwitchTitle: 'Switch to Dark Mode',
  10. docFooter: {
  11. next: 'Next Page',
  12. prev: 'Previous Page',
  13. },
  14. editLink: {
  15. pattern:
  16. 'https://github.com/vbenjs/vue-vben-admin/edit/main/docs/src/:path',
  17. text: 'Edit this page on GitHub',
  18. },
  19. footer: {
  20. copyright: `Copyright © 2020-${new Date().getFullYear()} Vben`,
  21. message: 'Released under the MIT License.',
  22. },
  23. langMenuLabel: 'Language',
  24. lastUpdated: {
  25. formatOptions: {
  26. dateStyle: 'short',
  27. timeStyle: 'medium',
  28. },
  29. text: 'Last updated on',
  30. },
  31. lightModeSwitchTitle: 'Switch to Light Mode',
  32. nav: nav(),
  33. outline: {
  34. label: 'Navigate',
  35. },
  36. returnToTopLabel: 'Back to top',
  37. sidebar: {
  38. '/en/commercial/': {
  39. base: '/en/commercial/',
  40. items: sidebarCommercial(),
  41. },
  42. '/en/guide/': { base: '/en/guide/', items: sidebarGuide() },
  43. },
  44. },
  45. });
  46. function sidebarGuide(): DefaultTheme.SidebarItem[] {
  47. return [
  48. {
  49. collapsed: false,
  50. text: 'Introduction',
  51. items: [
  52. {
  53. link: 'introduction/vben',
  54. text: 'About Vben Admin',
  55. },
  56. {
  57. link: 'introduction/why',
  58. text: 'Why Choose Us?',
  59. },
  60. { link: 'introduction/quick-start', text: 'Quick Start' },
  61. { link: 'introduction/thin', text: 'Lite Version' },
  62. ],
  63. },
  64. {
  65. text: 'Basics',
  66. items: [
  67. { link: 'essentials/concept', text: 'Basic Concepts' },
  68. { link: 'essentials/development', text: 'Local Development' },
  69. { link: 'essentials/route', text: 'Routing and Menu' },
  70. { link: 'essentials/settings', text: 'Configuration' },
  71. { link: 'essentials/icons', text: 'Icons' },
  72. { link: 'essentials/styles', text: 'Styles' },
  73. { link: 'essentials/external-module', text: 'External Modules' },
  74. { link: 'essentials/build', text: 'Build and Deployment' },
  75. { link: 'essentials/server', text: 'Server Interaction and Data Mock' },
  76. ],
  77. },
  78. {
  79. text: 'Advanced',
  80. items: [
  81. { link: 'in-depth/login', text: 'Login' },
  82. { link: 'in-depth/theme', text: 'Theme' },
  83. { link: 'in-depth/access', text: 'Access Control' },
  84. { link: 'in-depth/locale', text: 'Internationalization' },
  85. { link: 'in-depth/features', text: 'Common Features' },
  86. { link: 'in-depth/check-updates', text: 'Check Updates' },
  87. { link: 'in-depth/loading', text: 'Global Loading' },
  88. { link: 'in-depth/ui-framework', text: 'UI Framework Switching' },
  89. ],
  90. },
  91. {
  92. text: 'Engineering',
  93. items: [
  94. { link: 'project/standard', text: 'Standards' },
  95. { link: 'project/cli', text: 'CLI' },
  96. { link: 'project/dir', text: 'Directory Explanation' },
  97. { link: 'project/test', text: 'Unit Testing' },
  98. { link: 'project/tailwindcss', text: 'Tailwind CSS' },
  99. { link: 'project/changeset', text: 'Changeset' },
  100. { link: 'project/vite', text: 'Vite Config' },
  101. ],
  102. },
  103. {
  104. text: 'Others',
  105. items: [
  106. { link: 'other/project-update', text: 'Project Update' },
  107. { link: 'other/remove-code', text: 'Remove Code' },
  108. { link: 'other/faq', text: 'FAQ' },
  109. ],
  110. },
  111. ];
  112. }
  113. function sidebarCommercial(): DefaultTheme.SidebarItem[] {
  114. return [
  115. {
  116. link: 'community',
  117. text: 'Community',
  118. },
  119. {
  120. link: 'technical-support',
  121. text: 'Technical-support',
  122. },
  123. {
  124. link: 'customized',
  125. text: 'Customized',
  126. },
  127. ];
  128. }
  129. function nav(): DefaultTheme.NavItem[] {
  130. return [
  131. {
  132. activeMatch: '^/en/(guide|components)/',
  133. text: 'Doc',
  134. items: [
  135. {
  136. activeMatch: '^/en/guide/',
  137. link: '/en/guide/introduction/vben',
  138. text: 'Guide',
  139. },
  140. // {
  141. // activeMatch: '^/en/components/',
  142. // link: '/en/components/introduction',
  143. // text: 'Components',
  144. // },
  145. {
  146. text: 'Historical Versions',
  147. items: [
  148. {
  149. link: 'https://doc.vvbin.cn',
  150. text: '2.x Version Documentation',
  151. },
  152. ],
  153. },
  154. ],
  155. },
  156. {
  157. text: 'Demo',
  158. items: [
  159. {
  160. text: 'Vben Admin',
  161. items: [
  162. {
  163. link: 'https://www.vben.pro',
  164. text: 'Demo Version',
  165. },
  166. {
  167. link: 'https://ant.vben.pro',
  168. text: 'Ant Design Vue Version',
  169. },
  170. {
  171. link: 'https://naive.vben.pro',
  172. text: 'Naive Version',
  173. },
  174. {
  175. link: 'https://ele.vben.pro',
  176. text: 'Element Plus Version',
  177. },
  178. ],
  179. },
  180. {
  181. text: 'Others',
  182. items: [
  183. {
  184. link: 'https://vben.vvbin.cn',
  185. text: 'Vben Admin 2.x',
  186. },
  187. ],
  188. },
  189. ],
  190. },
  191. {
  192. text: version,
  193. items: [
  194. {
  195. link: 'https://github.com/vbenjs/vue-vben-admin/releases',
  196. text: 'Changelog',
  197. },
  198. {
  199. link: 'https://github.com/orgs/vbenjs/projects/5',
  200. text: 'Roadmap',
  201. },
  202. {
  203. link: 'https://github.com/vbenjs/vue-vben-admin/blob/main/.github/contributing.md',
  204. text: 'Contribution',
  205. },
  206. ],
  207. },
  208. {
  209. link: '/commercial/technical-support',
  210. text: '🦄 Tech Support',
  211. },
  212. {
  213. link: '/sponsor/personal',
  214. text: '✨ Sponsor',
  215. },
  216. {
  217. link: '/commercial/community',
  218. text: '👨‍👦‍👦 Community',
  219. },
  220. // {
  221. // link: '/friend-links/',
  222. // text: '🤝 Friend Links',
  223. // },
  224. ];
  225. }