en.mts 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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. },
  197. ];
  198. }
  199. function nav(): DefaultTheme.NavItem[] {
  200. return [
  201. {
  202. activeMatch: '^/en/(guide|components)/',
  203. text: 'Doc',
  204. items: [
  205. {
  206. activeMatch: '^/en/guide/',
  207. link: '/en/guide/introduction/vben',
  208. text: 'Guide',
  209. },
  210. {
  211. activeMatch: '^/en/components/',
  212. link: '/en/components/introduction',
  213. text: 'Components',
  214. },
  215. {
  216. text: 'Historical Versions',
  217. items: [
  218. {
  219. link: 'https://doc.vvbin.cn',
  220. text: '2.x Version Documentation',
  221. },
  222. ],
  223. },
  224. ],
  225. },
  226. {
  227. text: 'Demo',
  228. items: [
  229. {
  230. text: 'Vben Admin',
  231. items: [
  232. {
  233. link: 'https://www.vben.pro',
  234. text: 'Demo Version',
  235. },
  236. {
  237. link: 'https://ant.vben.pro',
  238. text: 'Ant Design Vue Version',
  239. },
  240. {
  241. link: 'https://naive.vben.pro',
  242. text: 'Naive Version',
  243. },
  244. {
  245. link: 'https://ele.vben.pro',
  246. text: 'Element Plus Version',
  247. },
  248. ],
  249. },
  250. {
  251. text: 'Others',
  252. items: [
  253. {
  254. link: 'https://vben.vvbin.cn',
  255. text: 'Vben Admin 2.x',
  256. },
  257. ],
  258. },
  259. ],
  260. },
  261. {
  262. text: version,
  263. items: [
  264. {
  265. link: 'https://github.com/vbenjs/vue-vben-admin/releases',
  266. text: 'Changelog',
  267. },
  268. {
  269. link: 'https://github.com/orgs/vbenjs/projects/5',
  270. text: 'Roadmap',
  271. },
  272. {
  273. link: 'https://github.com/vbenjs/vue-vben-admin/blob/main/.github/contributing.md',
  274. text: 'Contribution',
  275. },
  276. ],
  277. },
  278. {
  279. link: '/commercial/technical-support',
  280. text: '🦄 Tech Support',
  281. },
  282. {
  283. link: '/sponsor/personal',
  284. text: '✨ Sponsor',
  285. },
  286. {
  287. link: '/commercial/community',
  288. text: '👨‍👦‍👦 Community',
  289. },
  290. // {
  291. // link: '/friend-links/',
  292. // text: '🤝 Friend Links',
  293. // },
  294. ];
  295. }