en.mts 6.0 KB

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