4
4
5
5
# Summary
6
6
7
- - a new ` @vuepress/plugin-blog ` , featured with tags, categories, drafting, pagination
8
- - a ` @vuepress/theme-plog `
7
+ - ` @vuepress/plugin-blog ` , featured with tags, categories, drafting, pagination
8
+ - ` @vuepress/theme-plog ` , featured with
9
9
10
10
# Basic example
11
11
12
12
See [ detailed design] ( #detailed-design ) section.
13
13
14
14
# Motivation
15
15
16
- By popular demand, VuePress will provide some official blog supports, including a blog plugin and an atomic blog theme.
16
+ With popular demand, VuePress will provide some official blog supports, including a blog plugin and an atomic blog theme.
17
17
18
18
See: [ #36 ] ( https://github.com/vuejs/vuepress/issues/36 )
19
19
@@ -33,8 +33,8 @@ module.exports = {
33
33
postsSorter (postA , postB ) {
34
34
// default: Array.prototype.sort
35
35
},
36
- perPagePosts : 10 ,
37
- layout: ' Layout ' ,
36
+ postsPerPage : 10 ,
37
+ layout: ' Pagination ' ,
38
38
},
39
39
}
40
40
}
@@ -69,24 +69,6 @@ And there are pages automatically generated:
69
69
- /categories/
70
70
- /categories/cat/
71
71
72
- ### specify via config
73
-
74
- ``` js
75
- module .exports = {
76
- themeConfig: {
77
- directories: [
78
- {
79
- path: ' dog' ,
80
- category: ' dog' ,
81
- layout: ' DogLayout' ,
82
- }
83
- ]
84
- }
85
- }
86
- ```
87
-
88
- ### prev/next pages
89
-
90
72
If a post has its category, its previous/next page will be posts next to it under the same category.
91
73
92
74
## Drafting
@@ -97,20 +79,7 @@ draft: true
97
79
---
98
80
```
99
81
100
- And this page will only be rendered with dev mode. Drafting can also be specified via config:
101
-
102
- ``` js
103
- module .exports = {
104
- themeConfig: {
105
- directories: [
106
- {
107
- path: ' _draft' ,
108
- draft: true ,
109
- }
110
- ]
111
- }
112
- }
113
- ```
82
+ And this page will only be rendered with dev mode.
114
83
115
84
## Authoring
116
85
@@ -148,6 +117,28 @@ And there are pages automatically generated if there are more than one authors:
148
117
- /authors/
149
118
- /authors/Shigma/
150
119
120
+ ## Directory-level Configuration
121
+
122
+ Drafting can also be specified via config:
123
+
124
+ ``` js
125
+ module .exports = {
126
+ themeConfig: {
127
+ directories: [
128
+ {
129
+ path: ' _draft' ,
130
+ draft: true ,
131
+ },
132
+ {
133
+ path: ' cat' ,
134
+ category: ' cat' ,
135
+ layout: ' CatLayout' ,
136
+ },
137
+ ]
138
+ }
139
+ }
140
+ ```
141
+
151
142
# Drawbacks
152
143
153
144
N/A
0 commit comments