You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/docs/api/node.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Create a VuePress application.
14
14
15
15
#### App.prototype.process: () => Promise\<void> | never
16
16
17
-
A asynchronous method used to prepare the context of the current app. which contains loading pages and plugins, apply plugins, etc.
17
+
An asynchronous method used to prepare the context of the current app, and which contains loading pages and plugins, apply plugins, etc.
18
18
19
19
#### App.prototype.dev: () => Promise\<App> | never
20
20
@@ -27,7 +27,7 @@ Launch a build process with current app context.
27
27
28
28
### dev(\[options]): Promise\<App>
29
29
30
-
Start a development server, actually it's implemented by `createApp`:
30
+
Start a development server, actually it’s implemented by `createApp`:
31
31
32
32
```js
33
33
asyncfunctiondev (options) {
@@ -39,7 +39,7 @@ async function dev (options) {
39
39
40
40
### build(\[options]): Promise\<App>
41
41
42
-
Build your source files as a static site, actually it's implemented by `createApp`:
42
+
Build your source files as a static site, actually it’s implemented by `createApp`:
43
43
44
44
```js
45
45
asyncfunctionbuild (options) {
@@ -96,4 +96,4 @@ See [dest](../config/README.md#dest).
96
96
- Type: `object`
97
97
- Required: `{}`
98
98
99
-
It's very useful when you're writing tests and don't want to depend on actual config file, for all options please head [siteConfig](../config/README.md).
99
+
It’s useful when you’re writing tests and don’t want to depend on actual config file, for all options please head [siteConfig](../config/README.md).
Copy file name to clipboardExpand all lines: packages/docs/docs/config/README.md
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ sidebar: auto
14
14
- Type: `string`
15
15
- Default: `/`
16
16
17
-
The base URL the site will be deployed at. You will need to set this if you plan to deploy your site under a sub path, for example, GitHub pages. If you plan to deploy your site to `https://foo.github.io/bar/`, then `base` should be set to `"/bar/"`. It should always start and end with a slash.
17
+
The base URL the site will be deployed at. You will need to set this if you plan to deploy your site under a sub path, for example, GitHub pages. If you plan to deploy your site to `https://foo.github.io/bar/`, then you should set`base` to `"/bar/"`. It should always start and end with a slash.
18
18
19
19
The `base` is automatically prepended to all the URLs that start with `/` in other options, so you only need to specify it once.
20
20
@@ -35,14 +35,14 @@ Title for the site. This will be the prefix for all page titles, and displayed i
35
35
- Type: `string`
36
36
- Default: `undefined`
37
37
38
-
Description for the site. This will be rendered as a `<meta>` tag in the page HTML.
38
+
Description for the site. This will render as a `<meta>` tag in the page HTML.
39
39
40
40
### head
41
41
42
42
- Type: `Array`
43
43
- Default: `[]`
44
44
45
-
Extra tags to be injected to the page HTML `<head>`. Each tag can be specified in the form of `[tagName, { attrName: attrValue }, innerHTML?]`. For example, to add a custom favicon:
45
+
Extra tags to inject into the page HTML `<head>`. You can specify each tag in the form of `[tagName, { attrName: attrValue }, innerHTML?]`. For example, to add a custom favicon:
46
46
47
47
```js
48
48
module.exports= {
@@ -102,10 +102,10 @@ A function to control what files should have `<link rel="preload">` resource hin
102
102
103
103
VuePress uses [cache-loader](https://github.com/webpack-contrib/cache-loader) by default to greatly speed up the compilation of webpack.
104
104
105
-
This option can be used to specify the path to the cache, and can also remove the cache before each build by setting it to `false`.
105
+
You can use this option to specify the path to the cache, and can also remove the cache before each build by setting it to `false`.
106
106
107
107
::: tip
108
-
This option can also be used through the CLI:
108
+
You can also use this option through the CLI:
109
109
110
110
```bash
111
111
vuepress dev docs --cache .cache # set cache path
@@ -118,7 +118,7 @@ vuepress dev docs --no-cache # remove cache before each build.
118
118
- Type: `Array`
119
119
- Default: `[]`
120
120
121
-
Specify extra files to be watched.
121
+
Specify extra files to watch.
122
122
123
123
You can watch any file if you want. File changes will trigger `vuepress` rebuilding and real-time updates.
124
124
@@ -135,9 +135,9 @@ module.exports = {
135
135
136
136
### palette.styl
137
137
138
-
If you wish to apply simple color overrides to the styling of the [default preset](https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/core/lib/client/style/config.styl) or define some color variables for using later, you can create an`.vuepress/styles/palette.styl` file.
138
+
To apply simple color overrides to the styling of the [default preset](https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/core/lib/client/style/config.styl) or define some color variables for using later, you can create a`.vuepress/styles/palette.styl` file.
139
139
140
-
There are a few color variables you can tweak:
140
+
There are some color variables you can tweak:
141
141
142
142
```stylus
143
143
// showing default values
@@ -148,12 +148,12 @@ $codeBgColor = #282c34
148
148
```
149
149
150
150
::: danger Note
151
-
You should ONLY write color variables in this file. since`palette.styl` will be imported at the end of the root stylus config file, as a config, it will be used by multiple files, so once you wrote styles here, your style would be duplicated by multiple times.
151
+
You should ONLY write color variables in this file. Since`palette.styl` will be imported at the end of the root Stylus config file, as a config, several files will use it, so once you wrote styles here, your style would be duplicated by multiple times.
152
152
:::
153
153
154
154
### index.styl
155
155
156
-
VuePress provides a convenient way to add extra styles. you can create an`.vuepress/styles/index.styl` file for that. This is a [Stylus](http://stylus-lang.com/) file but you can use normal CSS syntax as well.
156
+
VuePress provides a convenient way to add extra styles. You can create a`.vuepress/styles/index.styl` file for that. This is a [Stylus](http://stylus-lang.com/) file but you can use normal CSS syntax as well.
157
157
158
158
```stylus
159
159
.content {
@@ -163,7 +163,7 @@ VuePress provides a convenient way to add extra styles. you can create an `.vuep
163
163
164
164
**Also see:**
165
165
166
-
-[Why can't `palette.styl` and `index.styl` merge into one API?](../faq/README.md#why-can-t-palette-styl-and-index-styl-merge-into-one-api)
166
+
-[Why can’t `palette.styl` and `index.styl` merge into one API?](../faq/README.md#why-can-t-palette-styl-and-index-styl-merge-into-one-api)
167
167
168
168
## Theming
169
169
@@ -196,7 +196,7 @@ Provide config options to the used theme. The options will vary depending on the
196
196
- Type: `Object|Array`
197
197
- Default: `undefined`
198
198
199
-
Please refer to[Plugin > Using a plugin](../plugin/using-a-plugin.md) to learn how to use a plugin.
199
+
Please check out[Plugin > Using a plugin](../plugin/using-a-plugin.md) to learn how to use a plugin.
200
200
201
201
## Markdown
202
202
@@ -223,7 +223,7 @@ Function for transforming [header](../miscellaneous/glossary.md#headers) texts i
Options for [markdown-it-anchor](https://github.com/valeriangalliat/markdown-it-anchor). (Note: prefer `markdown.slugify`if you want to customize header ids.)
226
+
Options for [markdown-it-anchor](https://github.com/valeriangalliat/markdown-it-anchor). (Note: prefer `markdown.slugify` to customize header ids.)
227
227
228
228
### markdown.externalLinks
229
229
@@ -237,11 +237,11 @@ The key and value pair will be added to `<a>` tags that point to an external lin
237
237
- Type: `Object`
238
238
- Default: `{ includeLevel: [2, 3] }`
239
239
240
-
Options for [markdown-it-table-of-contents](https://github.com/Oktavilla/markdown-it-table-of-contents). (Note: prefer `markdown.slugify`if you want to customize header ids.)
240
+
Options for [markdown-it-table-of-contents](https://github.com/Oktavilla/markdown-it-table-of-contents). (Note: prefer `markdown.slugify` to customize header ids.)
241
241
242
242
### markdown.plugins
243
243
244
-
You can install any markdown-it plugins through `markdown.plugins` option. It is similar with [using VuePress plugins](../plugin/using-a-plugin.html#using-a-plugin). You can either use Babel style or object style. The `markdown-it-` prefix is optional and can omit in the list.
244
+
You can install any markdown-it plugins through `markdown.plugins` option. It’s similar with [using VuePress plugins](../plugin/using-a-plugin.html#using-a-plugin). You can either use Babel style or object style. The `markdown-it-` prefix is optional and can omit in the list.
245
245
246
246
```js
247
247
module.exports= {
@@ -256,7 +256,7 @@ module.exports = {
256
256
}
257
257
```
258
258
259
-
or
259
+
Or
260
260
261
261
```js
262
262
module.exports= {
@@ -276,7 +276,7 @@ module.exports = {
276
276
- Type: `Function`
277
277
- Default: `undefined`
278
278
279
-
A function to modify default config or apply additional plugins to the [markdown-it](https://github.com/markdown-it/markdown-it) instance used to render source files. e.g.
279
+
A function to edit default config or apply extra plugins to the [markdown-it](https://github.com/markdown-it/markdown-it) instance used to render source files. For example:
280
280
281
281
```js
282
282
module.exports= {
@@ -306,7 +306,7 @@ VuePress comes with built-in webpack config for the CSS pre-processors listed be
306
306
307
307
Options for [postcss-loader](https://github.com/postcss/postcss-loader). Note specifying this value will overwrite autoprefixer and you will need to include it yourself.
308
308
309
-
### stylus
309
+
### Stylus
310
310
311
311
- Type: `Object`
312
312
- Default: `{ preferPathResolver: 'webpack' }`
@@ -320,7 +320,7 @@ Options for [stylus-loader](https://github.com/shama/stylus-loader).
320
320
321
321
Options for [sass-loader](https://github.com/webpack-contrib/sass-loader) to load `*.scss` files.
322
322
323
-
### sass
323
+
### Sass
324
324
325
325
- Type: `Object`
326
326
- Default: `{ indentedSyntax: true }`
@@ -339,7 +339,7 @@ Options for [less-loader](https://github.com/webpack-contrib/less-loader).
339
339
- Type: `Object | Function`
340
340
- Default: `undefined`
341
341
342
-
Modify the internal webpack config. If the value is an Object, it will be merged into the final config using [webpack-merge](https://github.com/survivejs/webpack-merge); If the value is a function, it will receive the config as the 1st argument and an `isServer` flag as the 2nd argument. You can either mutate the config directly, or return an object to be merged:
342
+
Edit the internal webpack config. If the value is an Object, it will be merged into the final config using [webpack-merge](https://github.com/survivejs/webpack-merge); If the value is a function, it will receive the config as the 1st argument and an `isServer` flag as the 2nd argument. You can either mutate the config directly, or return an object to merge:
343
343
344
344
```js
345
345
module.exports= {
@@ -356,7 +356,7 @@ module.exports = {
356
356
- Type: `Function`
357
357
- Default: `undefined`
358
358
359
-
Modify the internal webpack config with [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain).
359
+
Edit the internal webpack config with [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain).
Copy file name to clipboardExpand all lines: packages/docs/docs/faq/README.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ sidebar: auto
4
4
5
5
# FAQ
6
6
7
-
## Why can't `palette.styl` and `index.styl` merge into one API?
7
+
## Why can’t `palette.styl` and `index.styl` merge into one API?
8
8
9
-
The `palette.styl` is responsible for global color settings. During compilation, theme color constants should be resolved by the preprocessor first and then be applied to the global context.
9
+
The `palette.styl` is responsible for global color settings. During compilation, theme color constants should be resolved by the preprocessor first and then be applied to the global context.
10
10
11
-
But for `index.styl`. its job is to override the default styles of application. According to the priority principle of css, the later style has a higher priority, so it should be generated at the end of the CSS file.
11
+
But for `index.styl`, its job is to override the default styles of application. According to the priority principle of CSS, the later style has a higher priority, so it should be generated at the end of the CSS file.
12
12
13
-
A simple diagram describing the stylus compiler's compilation order as follows:
13
+
A simple diagram describing the Stylus compiler’s compilation order as follows:
14
14
15
15
@flowstart
16
16
stage1=>operation: palette.styl
@@ -22,11 +22,11 @@ stage1->stage2->stage3
22
22
23
23
<br>
24
24
25
-
## What's the differences between the `clientDynamicModules` and `enhanceAppFiles`?
25
+
## What’s the differences between the `clientDynamicModules` and `enhanceAppFiles`?
26
26
27
-
Let's take a look back first, both `clientDynamicModules` and `enhanceAppFiles` can generate modules with dynamic javascript code during compile time.
27
+
Let’s take a look back first, both `clientDynamicModules` and `enhanceAppFiles` can generate modules with dynamic JavaScript code during compile time.
28
28
29
-
The difference is that the files generated by `enhanceAppFiles` will be loaded and applied automatically when the application is initialized on the clientside. While the files generated by `clientDynamicModules`needs to be imported as `@dynamic/xxx` by the users themselves.
29
+
The difference is that the files generated by `enhanceAppFiles` will be loaded and applied automatically when the application is initialized on the client-side, while the files generated by `clientDynamicModules`need to be imported as `@dynamic/xxx` by the users themselves.
1. I want to execute some code on the clientside automatically.
52
-
2. I don't have a need for reuse of this module.
51
+
1. I want to execute some code on the client-side automatically.
52
+
2. I don’t need to reuse this module.
53
53
54
54
**Example:**
55
55
56
-
-[@vuepress/plugin-register-components](https://github.com/vuejs/vuepress/tree/master/packages/@vuepress/plugin-register-components/index.js#L24): Automatically registering components on the clientside.
56
+
-[@vuepress/plugin-register-components](https://github.com/vuejs/vuepress/tree/master/packages/@vuepress/plugin-register-components/index.js#L24): Automatically registering components on the client-side.
57
57
-[@vuepress/plugin-pagination](https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/plugin-pagination/index.js#L14): Automatically insert Vue plugins to expand the API of the client.
-[@vuepress/plugin-blog](https://github.com/ulivz/vuepress-plugin-blog/blob/master/src/index.ts#L167): Using compile-time metadata to generate some dynamic blog-related modules and initialize them on the clientside by using `enhanceAppFiles`.
66
+
-[@vuepress/plugin-blog](https://github.com/ulivz/vuepress-plugin-blog/blob/master/src/index.ts#L167): Using compile-time metadata to generate some dynamic blog-related modules and initialize them on the client-side by using `enhanceAppFiles`.
0 commit comments