File tree 5 files changed +30
-14
lines changed
5 files changed +30
-14
lines changed Original file line number Diff line number Diff line change 3
3
node_modules
4
4
5
5
/docs /.vitepress /cache /
6
+ /docs /.vitepress /dist /
Original file line number Diff line number Diff line change 1
1
import { defineConfig } from "vitepress"
2
2
import { shared } from "./shared"
3
- import { enGB } from ' ./en-GB'
4
- import { zhCN } from ' ./zh-CN'
3
+ import { enGB } from " ./en-GB"
4
+ import { zhCN } from " ./zh-CN"
5
5
6
6
// https://vitepress.dev/reference/site-config
7
7
export default defineConfig ( {
8
8
...shared ,
9
9
locales : {
10
10
root : {
11
11
label : "English (Great Britain)" ,
12
- // lang: "en-GB",
13
12
...enGB ,
14
13
} ,
15
14
"zh-CN" : {
16
15
label : "Chinese (Simplified) | 简体中文" ,
17
- // lang: "zh-CN",
18
- // link: "/zh-CN",
19
16
...zhCN ,
20
17
} ,
21
18
} ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export const enGB = defineConfig({
5
5
description : "A non-profit open source developer organisation." ,
6
6
themeConfig : {
7
7
nav : nav ( ) ,
8
+ sidebar : sidebar ( ) ,
8
9
} ,
9
10
} )
10
11
@@ -17,3 +18,15 @@ function nav(): DefaultTheme.NavItem[] {
17
18
} ,
18
19
]
19
20
}
21
+
22
+ function sidebar ( ) : DefaultTheme . Sidebar {
23
+ return [
24
+ {
25
+ text : "Examples" ,
26
+ items : [
27
+ { text : "Markdown Examples" , link : "/markdown-examples" } ,
28
+ { text : "Runtime API Examples" , link : "/api-examples" } ,
29
+ ] ,
30
+ } ,
31
+ ]
32
+ }
Original file line number Diff line number Diff line change @@ -5,15 +5,7 @@ export const shared = defineConfig({
5
5
description : "OnixByte Official Site" ,
6
6
themeConfig : {
7
7
// https://vitepress.dev/reference/default-theme-config
8
- sidebar : [
9
- {
10
- text : "Examples" ,
11
- items : [
12
- { text : "Markdown Examples" , link : "/markdown-examples" } ,
13
- { text : "Runtime API Examples" , link : "/api-examples" } ,
14
- ] ,
15
- } ,
16
- ] ,
8
+
17
9
socialLinks : [
18
10
{ icon : "github" , link : "https://github.com/onixbyte-opensource" } ,
19
11
] ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export const zhCN = defineConfig({
5
5
description : "一个非营利性开源开发者组织。" ,
6
6
themeConfig : {
7
7
nav : nav ( ) ,
8
+ sidebar : sidebar ( ) ,
8
9
} ,
9
10
} )
10
11
@@ -17,3 +18,15 @@ function nav(): DefaultTheme.NavItem[] {
17
18
} ,
18
19
]
19
20
}
21
+
22
+ function sidebar ( ) : DefaultTheme . Sidebar {
23
+ return [
24
+ {
25
+ text : "案例" ,
26
+ items : [
27
+ { text : "Markdown 案例" , link : "/zh-CN/markdown-examples" } ,
28
+ { text : "运行时 API 案例" , link : "/zh-CN/api-examples" } ,
29
+ ] ,
30
+ } ,
31
+ ]
32
+ }
You can’t perform that action at this time.
0 commit comments