Skip to content

Commit c966ca0

Browse files
committed
update sidebar
1 parent 8759497 commit c966ca0

File tree

7 files changed

+38
-9
lines changed

7 files changed

+38
-9
lines changed

docs/.vitepress/config.js

+26-9
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,31 @@ export default {
1313
]
1414
}
1515
],
16-
sidebar: [
17-
{
18-
text: 'Guide',
19-
items: [
20-
{ text: 'Introduction', link: '/introduction' },
21-
{ text: 'Getting Started', link: '/getting-started' },
22-
]
23-
}
24-
]
16+
sidebar: {
17+
// This sidebar gets displayed when user is under `guide` directory.
18+
'/guide/': [
19+
{
20+
text: 'Guide',
21+
items: [
22+
// This shows `/guide/index.md` page.
23+
{ text: 'Index', link: '/guide/' }, // /guide/index.md
24+
{ text: 'One', link: '/guide/one' }, // /guide/one.md
25+
{ text: 'Two', link: '/guide/two' } // /guide/two.md
26+
]
27+
}
28+
],
29+
// This sidebar gets displayed when user is under `config` directory.
30+
'/config/': [
31+
{
32+
text: 'Config',
33+
items: [
34+
// This shows `/config/index.md` page.
35+
{ text: 'Index', link: '/config/' }, // /config/index.md
36+
{ text: 'Three', link: '/config/three' }, // /config/three.md
37+
{ text: 'Four', link: '/config/four' } // /config/four.md
38+
]
39+
}
40+
]
41+
}
2542
}
2643
}

docs/config/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# index

docs/config/one.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# one

docs/config/two.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# two

docs/guide/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# index

docs/guide/one.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# one

docs/guide/two.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
# two

0 commit comments

Comments
 (0)