Skip to content

Commit b9a4f8f

Browse files
author
reco_luan
committed
feat(vuepress-theme-reco): add sub sidebar
1 parent f5f13c6 commit b9a4f8f

File tree

22 files changed

+2698
-153
lines changed

22 files changed

+2698
-153
lines changed

example/.vuepress/config.js

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,38 @@ module.exports = {
77
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }]
88
],
99
// theme: 'reco',
10-
locales: {
11-
'/': {
12-
lang: 'ja-JP',
13-
title: "vuepress-theme-reco",
14-
description: 'A simple and beautiful vuepress blog theme.',
15-
},
16-
},
1710
theme: require.resolve('../../packages/vuepress-theme-reco'),
1811
themeConfig: {
19-
locales: {
20-
'/': {
21-
recoLocales: {
22-
pagation: {
23-
prev: '上壹頁',
24-
next: '下壹頁',
25-
go: '前往',
26-
jump: '跳轉至'
27-
}
28-
}
29-
}
30-
},
3112
nav: [
3213
{ text: 'Home', link: '/', icon: 'reco-home' },
3314
{ text: 'TimeLine', link: '/timeline/', icon: 'reco-date' },
34-
{ text: 'Contact',
35-
icon: 'reco-message',
36-
items: [
37-
{ text: 'NPM', link: 'https://www.npmjs.com/~reco_luan', icon: 'reco-npm' },
38-
{ text: 'GitHub', link: 'https://github.com/recoluan', icon: 'reco-github' },
39-
{ text: '简书', link: 'https://www.jianshu.com/u/cd674a19515e', icon: 'reco-jianshu' },
40-
{ text: 'CSDN', link: 'https://blog.csdn.net/recoluan', icon: 'reco-csdn' },
41-
{ text: '博客圆', link: 'https://www.cnblogs.com/luanhewei/', icon: 'reco-bokeyuan' },
42-
{ text: 'WeChat', link: 'https://mp.weixin.qq.com/s/mXFqeUTegdvPliXknAAG_A', icon: 'reco-wechat' },
43-
]
44-
}
15+
{ text: 'sidebar', link: '/views/sidebar/' },
16+
{ text: 'sidebar', link: '/views/sidebargroup/' }
4517
],
18+
sidebar: {
19+
'/views/sidebar/': [
20+
'',
21+
'bar1',
22+
'bar2'
23+
],
24+
'/views/sidebargroup/': [
25+
{
26+
title: '基础',
27+
collapsable: true,
28+
children: [
29+
'',
30+
'bar1'
31+
]
32+
},
33+
{
34+
title: '进阶',
35+
collapsable: true,
36+
children: [
37+
'bar2'
38+
]
39+
},
40+
]
41+
},
4642
type: 'blog',
4743
// 博客设置
4844
blogConfig: {
@@ -55,14 +51,14 @@ module.exports = {
5551
text: 'Tag' // 默认 “标签”
5652
}
5753
},
58-
type: 'blog',
5954
logo: '/head.png',
6055
authorAvatar: '/head.png',
6156
// 搜索设置
6257
search: true,
6358
searchMaxSuggestions: 10,
6459
// 自动形成侧边导航
65-
sidebar: 'auto',
60+
// sidebar: 'auto',
61+
sidebarDepth: 4,
6662
// 最后更新时间
6763
lastUpdated: 'Last Updated',
6864
// 作者
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// $accentColor = #424242
2-
// $textColor = #232321
2+
// $textColor = #232321
Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,69 @@
11
---
2-
title: second page in category1
2+
title: sidebar test
33
date: 2019-09-21
4+
sidebarDepth: 5
45
tags:
56
- tag2
67
categories:
78
- category1
89
---
910

10-
second page in category1
11+
## 二级标题1
12+
13+
### 三级标题1-1
14+
15+
#### 四级标题1-1-1
16+
#### 四级标题1-1-2
17+
#### 四级标题1-1-3
18+
19+
### 三体标题1-2
20+
21+
#### 四级标题1-2-1
22+
#### 四级标题1-2-2
23+
#### 四级标题1-2-3
24+
25+
### 三体标题1-3
26+
27+
#### 四级标题1-3-1
28+
#### 四级标题1-3-2
29+
#### 四级标题1-3-3
30+
31+
## 二级标题2
32+
33+
### 三级标题2-1
34+
35+
#### 四级标题2-1-1
36+
#### 四级标题2-1-2
37+
#### 四级标题2-1-3
38+
39+
### 三体标题2-2
40+
41+
#### 四级标题2-2-1
42+
#### 四级标题2-2-2
43+
#### 四级标题2-2-3
44+
45+
### 三体标题2-3
46+
47+
#### 四级标题2-3-1
48+
#### 四级标题2-3-2
49+
#### 四级标题2-3-3
50+
51+
## 二级标题3
52+
53+
### 三级标题3-1
54+
55+
#### 四级标题3-1-1
56+
#### 四级标题3-1-2
57+
#### 四级标题3-1-3
58+
59+
### 三体标题3-2
60+
61+
#### 四级标题3-2-1
62+
#### 四级标题3-2-2
63+
#### 四级标题3-2-3
64+
65+
### 三体标题3-3
66+
67+
#### 四级标题3-3-1
68+
#### 四级标题3-3-2
69+
#### 四级标题3-3-3

0 commit comments

Comments
 (0)