en.mts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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/components/': {
  43. base: '/en/components/',
  44. items: sidebarComponents(),
  45. },
  46. '/en/guide/': { base: '/en/guide/', items: sidebarGuide() },
  47. },
  48. },
  49. });
  50. function sidebarGuide(): DefaultTheme.SidebarItem[] {
  51. return [
  52. {
  53. collapsed: false,
  54. text: 'Introduction',
  55. items: [
  56. {
  57. link: 'introduction/vben',
  58. text: 'About Vben Admin',
  59. },
  60. {
  61. link: 'introduction/why',
  62. text: 'Why Choose Us?',
  63. },
  64. { link: 'introduction/quick-start', text: 'Quick Start' },
  65. { link: 'introduction/thin', text: 'Lite Version' },
  66. {
  67. base: '/',
  68. link: 'components/introduction',
  69. text: 'Components',
  70. },
  71. ],
  72. },
  73. {
  74. text: 'Basics',
  75. items: [
  76. { link: 'essentials/concept', text: 'Basic Concepts' },
  77. { link: 'essentials/development', text: 'Local Development' },
  78. { link: 'essentials/route', text: 'Routing and Menu' },
  79. { link: 'essentials/settings', text: 'Configuration' },
  80. { link: 'essentials/icons', text: 'Icons' },
  81. { link: 'essentials/styles', text: 'Styles' },
  82. { link: 'essentials/external-module', text: 'External Modules' },
  83. { link: 'essentials/build', text: 'Build and Deployment' },
  84. { link: 'essentials/server', text: 'Server Interaction and Data Mock' },
  85. ],
  86. },
  87. {
  88. text: 'Advanced',
  89. items: [
  90. { link: 'in-depth/login', text: 'Login' },
  91. { link: 'in-depth/theme', text: 'Theme' },
  92. { link: 'in-depth/access', text: 'Access Control' },
  93. { link: 'in-depth/locale', text: 'Internationalization' },
  94. { link: 'in-depth/features', text: 'Common Features' },
  95. { link: 'in-depth/check-updates', text: 'Check Updates' },
  96. { link: 'in-depth/loading', text: 'Global Loading' },
  97. { link: 'in-depth/ui-framework', text: 'UI Framework Switching' },
  98. ],
  99. },
  100. {
  101. text: 'Engineering',
  102. items: [
  103. { link: 'project/standard', text: 'Standards' },
  104. { link: 'project/cli', text: 'CLI' },
  105. { link: 'project/dir', text: 'Directory Explanation' },
  106. { link: 'project/test', text: 'Unit Testing' },
  107. { link: 'project/tailwindcss', text: 'Tailwind CSS' },
  108. { link: 'project/changeset', text: 'Changeset' },
  109. { link: 'project/vite', text: 'Vite Config' },
  110. ],
  111. },
  112. {
  113. text: 'Others',
  114. items: [
  115. { link: 'other/project-update', text: 'Project Update' },
  116. { link: 'other/remove-code', text: 'Remove Code' },
  117. { link: 'other/faq', text: 'FAQ' },
  118. ],
  119. },
  120. ];
  121. }
  122. function sidebarCommercial(): DefaultTheme.SidebarItem[] {
  123. return [
  124. {
  125. link: 'community',
  126. text: 'Community',
  127. },
  128. {
  129. link: 'technical-support',
  130. text: 'Technical-support',
  131. },
  132. {
  133. link: 'customized',
  134. text: 'Customized',
  135. },
  136. ];
  137. }
  138. function sidebarComponents(): DefaultTheme.SidebarItem[] {
  139. return [
  140. {
  141. text: 'Components',
  142. items: [
  143. {
  144. link: 'introduction',
  145. text: 'Introduction',
  146. },
  147. ],
  148. },
  149. {
  150. collapsed: false,
  151. text: 'Layout UI',
  152. items: [
  153. {
  154. link: 'layout-ui/page',
  155. text: 'Page',
  156. },
  157. ],
  158. },
  159. {
  160. collapsed: false,
  161. text: 'Common UI',
  162. items: [
  163. {
  164. link: 'common-ui/vben-api-component',
  165. text: 'ApiComponent',
  166. },
  167. {
  168. link: 'common-ui/vben-alert',
  169. text: 'Alert',
  170. },
  171. {
  172. link: 'common-ui/vben-modal',
  173. text: 'Modal',
  174. },
  175. {
  176. link: 'common-ui/vben-drawer',
  177. text: 'Drawer',
  178. },
  179. {
  180. link: 'common-ui/vben-form',
  181. text: 'Form',
  182. },
  183. {
  184. link: 'common-ui/vben-vxe-table',
  185. text: 'Vxe Table',
  186. },
  187. {
  188. link: 'common-ui/vben-count-to-animator',
  189. text: 'CountToAnimator',
  190. },
  191. {
  192. link: 'common-ui/vben-ellipsis-text',
  193. text: 'EllipsisText',
  194. },
  195. {
  196. link: 'common-ui/vben-cropper',
  197. text: 'Cropper',
  198. },
  199. {
  200. link: 'common-ui/vben-tiptap',
  201. text: 'Tiptap RichTextEditor',
  202. },
  203. ],
  204. },
  205. ];
  206. }
  207. function nav(): DefaultTheme.NavItem[] {
  208. return [
  209. {
  210. activeMatch: '^/en/(guide|components)/',
  211. text: 'Doc',
  212. items: [
  213. {
  214. activeMatch: '^/en/guide/',
  215. link: '/en/guide/introduction/vben',
  216. text: 'Guide',
  217. },
  218. {
  219. activeMatch: '^/en/components/',
  220. link: '/en/components/introduction',
  221. text: 'Components',
  222. },
  223. {
  224. text: 'Historical Versions',
  225. items: [
  226. {
  227. link: 'https://doc.vvbin.cn',
  228. text: '2.x Version Documentation',
  229. },
  230. ],
  231. },
  232. ],
  233. },
  234. {
  235. text: 'Demo',
  236. items: [
  237. {
  238. text: 'Vben Admin',
  239. items: [
  240. {
  241. link: 'https://www.vben.pro',
  242. text: 'Demo Version',
  243. },
  244. {
  245. link: 'https://ant.vben.pro',
  246. text: 'Ant Design Vue Version',
  247. },
  248. {
  249. link: 'https://naive.vben.pro',
  250. text: 'Naive Version',
  251. },
  252. {
  253. link: 'https://ele.vben.pro',
  254. text: 'Element Plus Version',
  255. },
  256. ],
  257. },
  258. {
  259. text: 'Others',
  260. items: [
  261. {
  262. link: 'https://vben.vvbin.cn',
  263. text: 'Vben Admin 2.x',
  264. },
  265. ],
  266. },
  267. ],
  268. },
  269. {
  270. text: version,
  271. items: [
  272. {
  273. link: 'https://github.com/vbenjs/vue-vben-admin/releases',
  274. text: 'Changelog',
  275. },
  276. {
  277. link: 'https://github.com/orgs/vbenjs/projects/5',
  278. text: 'Roadmap',
  279. },
  280. {
  281. link: 'https://github.com/vbenjs/vue-vben-admin/blob/main/.github/contributing.md',
  282. text: 'Contribution',
  283. },
  284. ],
  285. },
  286. {
  287. link: '/commercial/technical-support',
  288. text: '🦄 Tech Support',
  289. },
  290. {
  291. link: '/sponsor/personal',
  292. text: '✨ Sponsor',
  293. },
  294. {
  295. link: '/commercial/community',
  296. text: '👨‍👦‍👦 Community',
  297. },
  298. // {
  299. // link: '/friend-links/',
  300. // text: '🤝 Friend Links',
  301. // },
  302. ];
  303. }