@@ -10,6 +10,20 @@ export default defineConfig({
1010 lang : 'en-US' ,
1111 title : 'Nginx UI' ,
1212 description : 'Yet another Nginx Web UI' ,
13+
14+ lastUpdated : true ,
15+
16+ locales : {
17+ root : {
18+ label : 'English' ,
19+ lang : 'en'
20+ } ,
21+ zh_CN : {
22+ label : '简体中文' ,
23+ lang : 'zh_CN'
24+ }
25+ } ,
26+
1327 themeConfig : {
1428 // https://vitepress.dev/reference/default-theme-config
1529 nav : [
@@ -18,27 +32,10 @@ export default defineConfig({
1832 { text : 'Demo' , link : 'https://nginxui.jackyu.cn' }
1933 ] ,
2034
21- sidebar : {
22- '/guide/' : [
23- {
24- text : 'Introduction' ,
25- items : [
26- { text : 'What is Nginx UI?' , link : '/guide/about' } ,
27- { text : 'Getting Started' , link : '/guide/getting-started' } ,
28- { text : 'Nginx Proxy Example' , link : '/guide/nginx-proxy-example' } ,
29- { text : 'Contributing' , link : '/guide/contributing' } ,
30- { text : 'License' , link : '/guide/license' }
31- ]
32- } ,
33- {
34- text : 'Configuration' ,
35- items : [
36- { text : 'Server' , link : '/guide/config-server' } ,
37- { text : 'Nginx Log' , link : '/guide/config-nginx-log' } ,
38- { text : 'Open AI' , link : '/guide/config-openai' }
39- ]
40- }
41- ]
35+ sidebar : sidebar ( ) ,
36+
37+ editLink : {
38+ pattern : 'https://github.com/0xJacky/nginx-ui/edit/master/frontend/docs/:path'
4239 } ,
4340
4441 search : {
@@ -55,3 +52,52 @@ export default defineConfig({
5552 ]
5653 }
5754} )
55+
56+ function sidebar ( ) {
57+ return {
58+ '/guide/' : [
59+ {
60+ text : 'Introduction' ,
61+ collapsed : false ,
62+ items : [
63+ { text : 'What is Nginx UI?' , link : '/guide/about' } ,
64+ { text : 'Getting Started' , link : '/guide/getting-started' } ,
65+ { text : 'Nginx Proxy Example' , link : '/guide/nginx-proxy-example' } ,
66+ { text : 'Contributing' , link : '/guide/contributing' } ,
67+ { text : 'License' , link : '/guide/license' }
68+ ]
69+ } ,
70+ {
71+ text : 'Configuration' ,
72+ collapsed : false ,
73+ items : [
74+ { text : 'Server' , link : '/guide/config-server' } ,
75+ { text : 'Nginx Log' , link : '/guide/config-nginx-log' } ,
76+ { text : 'Open AI' , link : '/guide/config-openai' }
77+ ]
78+ }
79+ ] ,
80+ '/zh_CN/guide/' : [
81+ {
82+ text : '介绍' ,
83+ collapsed : false ,
84+ items : [
85+ { text : '何为 Nginx UI?' , link : '/zh_CN/guide/about' } ,
86+ { text : '即刻开始' , link : '/zh_CN/guide/getting-started' } ,
87+ { text : 'Nginx 代理示例' , link : '/zh_CN/guide/nginx-proxy-example' } ,
88+ { text : '贡献代码' , link : '/zh_CN/guide/contributing' } ,
89+ { text : '开源协议' , link : '/zh_CN/guide/license' }
90+ ]
91+ } ,
92+ {
93+ text : '配置' ,
94+ collapsed : false ,
95+ items : [
96+ { text : '服务端' , link : '/zh_CN/guide/config-server' } ,
97+ { text : 'Nginx 日志' , link : '/zh_CN/guide/config-nginx-log' } ,
98+ { text : 'Open AI' , link : '/zh_CN/guide/config-openai' }
99+ ]
100+ }
101+ ]
102+ }
103+ }
0 commit comments