11import { defineConfig } from 'vitepress' ;
22
33// ============================================================
4- // v2(当前版本) 侧边栏
4+ // 侧边栏
55// ============================================================
66const guideSidebar = [
77 {
@@ -39,111 +39,6 @@ const guideSidebar = [
3939 } ,
4040] ;
4141
42- // ============================================================
43- // v1(旧版)侧边栏
44- // ============================================================
45- const v1GuideSidebar = [
46- {
47- text : '开始' ,
48- collapsed : false ,
49- items : [
50- { text : '快速上手' , link : '/v1/guide/quick-start' } ,
51- { text : '常见问题' , link : '/v1/faq' } ,
52- ] ,
53- } ,
54- {
55- text : '基础指南' ,
56- collapsed : false ,
57- items : [
58- { text : 'CLI 命令行' , link : '/v1/guide/basic/cli' } ,
59- { text : 'React' , link : '/v1/guide/basic/react' } ,
60- { text : 'public 目录' , link : '/v1/guide/basic/public' } ,
61- { text : '调试工具' , link : '/v1/guide/basic/devtools' } ,
62- { text : '错误处理' , link : '/v1/guide/basic/error-handling' } ,
63- { text : '小程序自定义组件' , link : '/v1/guide/basic/custom-component' } ,
64- { text : '使用小程序插件' , link : '/v1/guide/basic/plugin' } ,
65- ] ,
66- } ,
67- {
68- text : '进阶指南' ,
69- collapsed : false ,
70- items : [
71- { text : '混合开发' , link : '/v1/guide/advanced/hybrid' } ,
72- { text : '性能优化' , link : '/v1/guide/advanced/performance' } ,
73- { text : '使用插件' , link : '/v1/guide/advanced/plugin' } ,
74- { text : '状态共享' , link : '/v1/guide/advanced/sharing-state' } ,
75- { text : 'TypeScript 支持' , link : '/v1/guide/advanced/typescript' } ,
76- ] ,
77- } ,
78- {
79- text : '框架' ,
80- collapsed : false ,
81- items : [
82- { text : 'App' , link : '/v1/guide/framework/app' } ,
83- { text : '页面' , link : '/v1/guide/framework/page' } ,
84- { text : '组件' , link : '/v1/guide/framework/component' } ,
85- { text : '事件' , link : '/v1/guide/framework/event' } ,
86- { text : 'API' , link : '/v1/guide/framework/api' } ,
87- { text : '样式' , link : '/v1/guide/framework/style' } ,
88- ] ,
89- } ,
90- {
91- text : '跨平台开发' ,
92- collapsed : false ,
93- items : [
94- { text : 'Rsmax One' , link : '/v1/guide/one/' } ,
95- { text : 'Web 同构' , link : '/v1/guide/one/web' } ,
96- ] ,
97- } ,
98- {
99- text : '配置' ,
100- collapsed : false ,
101- items : [
102- { text : 'Rsmax 配置' , link : '/v1/guide/config/rsmax' } ,
103- { text : '环境变量' , link : '/v1/guide/config/environment-variables' } ,
104- { text : 'PostCSS 配置' , link : '/v1/guide/config/postcss' } ,
105- ] ,
106- } ,
107- {
108- text : '其他' ,
109- collapsed : false ,
110- items : [
111- { text : '小程序插件开发' , link : '/v1/guide/writing-mini-plugins' } ,
112- { text : '实现原理' , link : '/v1/guide/implementation-notes' } ,
113- ] ,
114- } ,
115- ] ;
116-
117- const v1ApiSidebar = [
118- {
119- text : 'API' ,
120- collapsed : false ,
121- items : [
122- { text : 'rsmax' , link : '/v1/api/rsmax' } ,
123- { text : 'rsmax / build' , link : '/v1/api/rsmax-build' } ,
124- { text : 'rsmax / macro' , link : '/v1/api/rsmax-macro' } ,
125- ] ,
126- } ,
127- {
128- text : 'rsmax / one' ,
129- collapsed : false ,
130- items : [
131- { text : 'API' , link : '/v1/api/rsmax-one/api' } ,
132- { text : '组件' , link : '/v1/api/rsmax-one/components' } ,
133- { text : '事件' , link : '/v1/api/rsmax-one/event' } ,
134- { text : '生命周期' , link : '/v1/api/rsmax-one/lifecycle' } ,
135- ] ,
136- } ,
137- {
138- text : 'rsmax / [平台]' ,
139- collapsed : false ,
140- items : [
141- { text : 'API' , link : '/v1/api/rsmax-platform/api' } ,
142- { text : '组件' , link : '/v1/api/rsmax-platform/component' } ,
143- ] ,
144- } ,
145- ] ;
146-
14742export default defineConfig ( {
14843 lang : 'zh-CN' ,
14944 title : 'Rsmax' ,
@@ -156,19 +51,9 @@ export default defineConfig({
15651
15752 nav : [
15853 { text : '指南' , link : '/guide/introduction' , activeMatch : '/guide/' } ,
159- {
160- text : 'v2.x' ,
161- items : [
162- { text : 'v2.x' , link : '/' } ,
163- { text : 'v1.x' , link : '/v1/' } ,
164- ] ,
165- } ,
16654 ] ,
16755
168- // 更具体的前缀需放在前面
16956 sidebar : {
170- '/v1/api/' : v1ApiSidebar ,
171- '/v1/' : v1GuideSidebar ,
17257 '/guide/' : guideSidebar ,
17358 } ,
17459
0 commit comments