en.mts 5.7 KB

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