Skip to content

Commit c3af170

Browse files
authored
docs: fix English grammatical anomalies, typos, and punctuation. (#2491)
1 parent 636e9c3 commit c3af170

File tree

12 files changed

+93
-99
lines changed

12 files changed

+93
-99
lines changed

packages/docs/docs/guide/assets.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## Relative URLs
44

5-
All Markdown files are compiled into Vue components and processed by webpack, so you can and **should prefer** referencing any asset using relative URLs:
5+
All Markdown files are compiled into Vue components and processed by [webpack](http://webpack.js.org/). You can, **and should **, reference any assets using relative URLs:
66

77
``` md
88
![An image](./image.png)
99
```
1010

1111
This would work the same way as in `*.vue` file templates. The image will be processed with `url-loader` and `file-loader`, and copied to appropriate locations in the generated static build.
1212

13-
Also, you can use the `~` prefix to explicitly specify this is a webpack module request, allowing you to reference files with webpack aliases or from npm dependencies:
13+
You can also use the `~` prefix to explicitly specify this is a webpack module request, allowing you to reference files with webpack aliases or from npm dependencies:
1414

1515
``` md
1616
![Image from alias](~@alias/image.png)
@@ -33,13 +33,13 @@ module.exports = {
3333

3434
## Public Files
3535

36-
Sometimes you may need to provide static assets that are not directly referenced in any of your Markdown or theme components - for example, favicons and PWA icons. In such cases, you can put them inside `.vuepress/public` and they will be copied to the root of the generated directory.
36+
Sometimes you may need to provide static assets that are not directly referenced in any of your Markdown or theme components (for example, favicons and PWA icons). In such cases, you can put them inside `.vuepress/public` and they will be copied to the root of the generated directory.
3737

3838
## Base URL
3939

4040
If your site is deployed to a non-root URL, you will need to set the `base` option in `.vuepress/config.js`. For example, 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).
4141

42-
With a base URL, to reference an image in `.vuepress/public`, you’d have to use URLs like `/bar/image.png`. Yet, this is brittle if you ever decide to change the `base` later. To help with that, VuePress provides a built-in helper `$withBase` (injected onto Vue’s prototype) that generates the correct path:
42+
With a base URL, to reference an image in `.vuepress/public`, you’d have to use URLs like `/bar/image.png`. But this is brittle if you ever decide to change the `base`. To help with that, VuePress provides a built-in helper `$withBase` (injected onto Vue’s prototype) that generates the correct path:
4343

4444
``` vue
4545
<img :src="$withBase('/foo.png')" alt="foo">

packages/docs/docs/guide/basic-config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Config File
44

5-
Without any configuration, the page is pretty minimal, and the user has no way to navigate around the site. To customize your site, let’s first create a `.vuepress` directory inside your docs directory. This is where all VuePress-specific files will be placed in. Your project structure is probably like this:
5+
Without any configuration, the page is pretty minimal, and the user has no way to navigate around the site. To customize your site, let’s first create a `.vuepress` directory inside your docs directory. This is where all VuePress-specific files will be placed. Your project structure is probably like this:
66

77
```
88
.
@@ -22,7 +22,7 @@ module.exports = {
2222
}
2323
```
2424

25-
If you’ve got the dev server running, you should see the page now has a header with the title and a search box. VuePress comes with built-in headers-based search - it automatically builds a simple search index from the title, `h2` and `h3` headers from all the pages.
25+
If you’ve got the dev server running, you should see the page now has a header with the title and a search box. VuePress comes with built-in headers-based search: it automatically builds a simple search index from the title, `h2`, and `h3` headers on all pages.
2626

2727
Check out the [Config Reference](../config/README.md) for a full list of options.
2828

@@ -38,7 +38,7 @@ To develop a custom theme, see [Writing a theme](../theme/writing-a-theme.md).
3838

3939
## App Level Enhancements
4040

41-
Since the VuePress app is a standard Vue app, you can apply app-level enhancements by creating a file `.vuepress/enhanceApp.js`, which will be imported into the app if it’s present. The file should `export default` a hook function which will receive an object containing some app-level values. You can use this hook to install extra Vue plugins, register global components, or add extra router hooks:
41+
Since the VuePress app is a standard Vue app, you can apply app-level enhancements by creating a file `.vuepress/enhanceApp.js`, which will be imported into the app if present. The file should `export default` a hook function which will receive an object containing some app-level values. You can use this hook to install extra Vue plugins, register global components, or add extra router hooks:
4242

4343
``` js
4444
// async function is also supported, too

packages/docs/docs/guide/deploy.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ The following guides are based on some shared assumptions:
1616

1717
## GitHub Pages
1818

19-
1. Set correct `base` in `docs/.vuepress/config.js`.
19+
1. Set the correct `base` in `docs/.vuepress/config.js`.
2020

2121
If you are deploying to `https://<USERNAME>.github.io/`, you can omit `base` as it defaults to `"/"`.
2222

23-
If you are deploying to `https://<USERNAME>.github.io/<REPO>/`, (that is your repository is at `https://github.com/<USERNAME>/<REPO>`), set `base` to `"/<REPO>/"`.
23+
If you are deploying to `https://<USERNAME>.github.io/<REPO>/`, e.g. your repository is at `https://github.com/<USERNAME>/<REPO>`, then set `base` to `"/<REPO>/"`.
2424

25-
2. Inside your project, create `deploy.sh` with the following content (with highlighted lines uncommented appropriately) and run it to deploy:
25+
2. Inside your project, create `deploy.sh` with the following content (with highlighted lines uncommented appropriately), and run it to deploy:
2626

2727
``` bash{13,20,23}
2828
#!/usr/bin/env sh
@@ -58,17 +58,17 @@ You can also run the above script in your CI setup to enable automatic deploymen
5858

5959
### GitHub Pages and Travis CI
6060

61-
1. Set correct `base` in `docs/.vuepress/config.js`.
61+
1. Set the correct `base` in `docs/.vuepress/config.js`.
6262

6363
If you are deploying to `https://<USERNAME or GROUP>.github.io/`, you can omit `base` as it defaults to `"/"`.
6464

65-
If you are deploying to `https://<USERNAME or GROUP>.github.io/<REPO>/`, (that is your repository is at `https://github.com/<USERNAME>/<REPO>`), set `base` to `"/<REPO>/"`.
65+
If you are deploying to `https://<USERNAME or GROUP>.github.io/<REPO>/`, e.g. your repository is at `https://github.com/<USERNAME>/<REPO>`, then set `base` to `"/<REPO>/"`.
6666

6767
2. Create a file named `.travis.yml` in the root of your project.
6868

6969
3. Run `yarn` or `npm install` locally and commit the generated lockfile (i.e. `yarn.lock` or `package-lock.json`).
7070

71-
4. Use GitHub Pages deploy provider template and follow the [travis documentation](https://docs.travis-ci.com/user/deployment/pages/).
71+
4. Use the GitHub Pages deploy provider template, and follow the [Travis CI documentation](https://docs.travis-ci.com/user/deployment/pages/).
7272

7373
``` yaml
7474
language: node_js
@@ -90,15 +90,15 @@ deploy:
9090
9191
### GitLab Pages and GitLab CI
9292
93-
1. Set correct `base` in `docs/.vuepress/config.js`.
93+
1. Set the correct `base` in `docs/.vuepress/config.js`.
9494

9595
If you are deploying to `https://<USERNAME or GROUP>.gitlab.io/`, you can omit `base` as it defaults to `"/"`.
9696

97-
If you are deploying to `https://<USERNAME or GROUP>.gitlab.io/<REPO>/`, (that is your repository is at `https://gitlab.com/<USERNAME>/<REPO>`), set `base` to `"/<REPO>/"`.
97+
If you are deploying to `https://<USERNAME or GROUP>.gitlab.io/<REPO>/`, e.g. your repository is at `https://gitlab.com/<USERNAME>/<REPO>`, then set `base` to `"/<REPO>/"`.
9898

9999
2. Set `dest` in `.vuepress/config.js` to `public`.
100100

101-
3. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content.
101+
3. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:
102102

103103
``` yaml
104104
image: node:9.11.1
@@ -126,7 +126,7 @@ pages:
126126
- **Build Command:** `yarn docs:build` or `npm run docs:build`
127127
- **Publish directory:** `docs/.vuepress/dist`
128128

129-
2. Hit the deploy button!
129+
2. Hit the deploy button.
130130

131131
## Google Firebase
132132

@@ -153,31 +153,31 @@ pages:
153153
}
154154
```
155155

156-
3. After running `yarn docs:build` or `npm run docs:build`, deploy with the command `firebase deploy`.
156+
3. After running `yarn docs:build` or `npm run docs:build`, deploy using the command `firebase deploy`.
157157

158158
## Surge
159159

160160
1. First install [surge](https://www.npmjs.com/package/surge), if you haven’t already.
161161

162162
2. Run `yarn docs:build` or `npm run docs:build`.
163163

164-
3. Deploy to surge, by typing `surge docs/.vuepress/dist`.
164+
3. Deploy to surge by typing `surge docs/.vuepress/dist`.
165165

166166
You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-domain) by adding `surge docs/.vuepress/dist yourdomain.com`.
167167

168168
## Heroku
169169

170-
1. First install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
170+
1. Install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli).
171171

172-
2. Create a Heroku account [here](https://signup.heroku.com).
172+
2. Create a Heroku account by [signing up](https://signup.heroku.com).
173173

174174
3. Run `heroku login` and fill in your Heroku credentials:
175175

176176
``` bash
177177
heroku login
178178
```
179179

180-
4. Create a file called `static.json` in the root of your project with the content below:
180+
4. Create a file called `static.json` in the root of your project with the below content:
181181

182182
`static.json`:
183183
```json
@@ -186,7 +186,7 @@ You can also deploy to a [custom domain](http://surge.sh/help/adding-a-custom-do
186186
}
187187
```
188188

189-
This is the configuration of your site. See more at [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static).
189+
This is the configuration of your site; read more at [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static).
190190

191191
5. Set up your Heroku git remote:
192192

@@ -203,7 +203,7 @@ heroku apps:create example
203203
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-static.git
204204
```
205205

206-
6. Deploying Your Site
206+
6. Deploy your site:
207207

208208
``` bash
209209
# publish site
@@ -215,4 +215,4 @@ heroku open
215215

216216
## Vercel
217217

218-
Please check out [Creating and Deploying a VuePress App with Vercel](https://vercel.com/guides/deploying-vuepress-to-vercel).
218+
See [Creating and Deploying a VuePress App with Vercel](https://vercel.com/guides/deploying-vuepress-to-vercel).

packages/docs/docs/guide/directory-structure.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Directory Structure
22

3-
VuePress follows the principle of **"Convention is better than configuration"**, the recommended document structure is as follows:
3+
VuePress follows the principle of **"Convention is better than configuration"**. The recommended structure is as follows:
44

55
<!-- textlint-disable terminology -->
66

@@ -35,7 +35,7 @@ VuePress follows the principle of **"Convention is better than configuration"**,
3535
Please note the capitalization of the directory name.
3636
:::
3737

38-
- `docs/.vuepress`: It’s used to store global configuration, components, static resources, etc.
38+
- `docs/.vuepress`: Used to store global configuration, components, static resources, etc.
3939
- `docs/.vuepress/components`: The Vue components in this directory will be automatically registered as global components.
4040
- `docs/.vuepress/theme`: Used to store local theme.
4141
- `docs/.vuepress/styles`: Stores style related files.
@@ -54,7 +54,7 @@ When customizing `templates/ssr.html`, or `templates/dev.html`, it’s best to e
5454

5555
## Default Page Routing
5656

57-
Here we take `docs` directory as the `targetDir` (See [Command-line Interface](../api/cli.md#usage)), and all the "Relative Path" below are relative to `docs` directory. Add `scripts` in `package.json` which is located in the project root directory:
57+
Here we use the `docs` directory as the `targetDir` (see [Command-line Interface](../api/cli.md#usage)). All the "Relative Paths" below are relative to the `docs` directory. Add `scripts` in `package.json` which is located in your project's root directory:
5858

5959
```json
6060
{

packages/docs/docs/guide/frontmatter.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Frontmatter
22

3-
Any Markdown file that contains a YAML frontmatter block will be processed by [gray-matter](https://github.com/jonschlinkert/gray-matter). The frontmatter must be the first thing in the Markdown file and must take the form of valid YAML set between triple-dashed lines. Here is a basic example:
3+
Any Markdown file that contains a YAML frontmatter block will be processed by [gray-matter](https://github.com/jonschlinkert/gray-matter). The frontmatter must be at the top of the Markdown file, and must take the form of valid YAML set between triple-dashed lines. Example:
44

55
```markdown
66
---
@@ -9,7 +9,7 @@ lang: en-US
99
---
1010
```
1111

12-
Between these triple-dashed lines, you can set predefined variables (see [below](#predefined-variables) for a reference), or even create custom ones of your own. These variables will then be available to you through the <code>[$frontmatter](./global-computed.md#frontmatter)</code> variable.
12+
Between the triple-dashed lines, you can set [predefined variables](#predefined-variables), or even create custom ones of your own. These variables can be used via the <code>[$frontmatter](./global-computed.md#frontmatter)</code> variable.
1313

1414
Here’s an example of how you could use it in your Markdown file:
1515

@@ -26,7 +26,7 @@ My blog post is written in {{ $frontmatter.language }}.
2626

2727
## Alternative frontmatter Formats
2828

29-
VuePress also supports JSON or [TOML](https://github.com/toml-lang/toml) frontmatter.
29+
VuePress also supports JSON and [TOML](https://github.com/toml-lang/toml) frontmatter syntax.
3030

3131
JSON frontmatter needs to start and end in curly braces:
3232

@@ -56,21 +56,21 @@ lang = "en-US"
5656
- Type: `string`
5757
- Default: `h1_title || siteConfig.title`
5858

59-
Title of current page.
59+
Title of the current page.
6060

6161
### lang
6262

6363
- Type: `string`
6464
- Default: `en-US`
6565

66-
Language of current page.
66+
Language of the current page.
6767

6868
### description
6969

7070
- Type: `string`
7171
- Default: `siteConfig.description`
7272

73-
Description of current page.
73+
Description of the current page.
7474

7575
### layout
7676

@@ -84,7 +84,7 @@ Set the layout component of the current page.
8484
- Type: `string`
8585
- Default: `siteConfig.permalink`
8686

87-
Refer to: [Permalinks](./permalinks.md).
87+
See [Permalinks](./permalinks.md) for details.
8888

8989
### metaTitle
9090

@@ -117,39 +117,39 @@ meta:
117117
- Type: `boolean`
118118
- Default: `undefined`
119119

120-
See: [Default Theme Config > Disable the Navbar](../theme/default-theme-config.md#disable-the-navbar).
120+
See [Default Theme Config > Disable the Navbar](../theme/default-theme-config.md#disable-the-navbar) for details.
121121

122122
### sidebar
123123

124124
- Type: `boolean|'auto'`
125125
- Default: `undefined`
126126

127-
See: [Default Theme Config > Sidebar](../theme/default-theme-config.md#sidebar).
127+
See [Default Theme Config > Sidebar](../theme/default-theme-config.md#sidebar) for details.
128128

129129
### prev
130130

131131
- Type: `boolean|string`
132132
- Default: `undefined`
133133

134-
See: [Default Theme Config > Prev / Next Links](../theme/default-theme-config.md#prev-next-links).
134+
See [Default Theme Config > Prev / Next Links](../theme/default-theme-config.md#prev-next-links) for details.
135135

136136
### next
137137

138138
- Type: `boolean|string`
139139
- Default: `undefined`
140140

141-
See: [Default Theme Config > Prev / Next Links](../theme/default-theme-config.md#prev-next-links).
141+
See [Default Theme Config > Prev / Next Links](../theme/default-theme-config.md#prev-next-links) for details.
142142

143143
### search
144144

145145
- Type: `boolean`
146146
- Default: `undefined`
147147

148-
See: [Default Theme Config > Built-in Search](../theme/default-theme-config.html#built-in-search).
148+
See [Default Theme Config > Built-in Search](../theme/default-theme-config.html#built-in-search) for details.
149149

150150
### tags
151151

152152
- Type: `array`
153153
- Default: `undefined`
154154

155-
See: [Default Theme Config > Built-in Search](../theme/default-theme-config.html#built-in-search).
155+
See [Default Theme Config > Built-in Search](../theme/default-theme-config.html#built-in-search). for details.

packages/docs/docs/guide/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This section will help you build a basic VuePress documentation site from ground
6161

6262
5. Add some [scripts](https://classic.yarnpkg.com/en/docs/package-json#toc-scripts) to `package.json`
6363

64-
This step is optional but highly recommended, the rest of the documentaion will assume those scripts being added.
64+
This step is optional but highly recommended, the rest of the documentation will assume those scripts being added.
6565

6666
``` json
6767
{
@@ -82,6 +82,6 @@ This section will help you build a basic VuePress documentation site from ground
8282

8383
By now, you should have a basic but functional VuePress documentation site. Next, learn about VuePress’ recommended [directory structure](directory-structure.html) and the basics of [configuration](basic-config.html) in VuePress.
8484

85-
Once you’re familiar with those concepts mentioned above, learn about how to enrich your content with [static assets](assets.html), [Markdown extensions](markdown.html) and [vue components](using-vue.html).
85+
Once you’re familiar with those concepts mentioned above, learn how to enrich your content with [static assets](assets.html), [Markdown extensions](markdown.html) and [vue components](using-vue.html).
8686

87-
And when your documentation site start to take shape, check out the [multi-language support](i18n.html) and guides for [deploying](deploy.html) your site to popular services.
87+
And when your documentation site starts to take shape, be sure to read about [multi-language support](i18n.html) and the [deployment guide](deploy.html).

packages/docs/docs/guide/global-computed.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Global Computed
22

3-
In VuePress, some core [computed](https://vuejs.org/v2/guide/computed.html#Computed-Properties) properties are built-in for use by [default theme](../theme/default-theme-config.md) or custom themes.
3+
In VuePress, some core [computed properties](https://vuejs.org/v2/guide/computed.html#Computed-Properties) can be used by the [default theme](../theme/default-theme-config.md) or custom themes.
44

55
## $site
66

7-
This is the `$site` value of the site you see now:
7+
This is the `$site` value of the site you're currently reading:
88

99
``` json
1010
{
@@ -25,7 +25,7 @@ This is the `$site` value of the site you see now:
2525

2626
## $page
2727

28-
This is the `$page` value of the page you see now:
28+
This is the `$page` value of the page you're currently reading:
2929

3030
``` json
3131
{
@@ -56,19 +56,15 @@ Reference of [$page](#page).frontmatter.
5656

5757
## $lang
5858

59-
The language of the current page, the default value is `en-US`.
59+
The language of the current page. Default: `en-US`.
6060

61-
**Also see:**
62-
63-
- [Internationalization](../guide/i18n.md)
61+
For more information, see [Internationalization](../guide/i18n.md).
6462

6563
## $localePath
6664

67-
The locale path prefix for the current page, the default value is `/`.
68-
69-
**Also see:**
65+
The locale path prefix for the current page. Default: `/`.
7066

71-
- [Internationalization](../guide/i18n.md)
67+
For more information, see [Internationalization](../guide/i18n.md).
7268

7369
## $title
7470

@@ -80,4 +76,4 @@ The `content` value of the `<meta name= "description" content= "...">` for the c
8076

8177
## $themeConfig
8278

83-
That is `siteConfig.themeConfig`
79+
Refers to `siteConfig.themeConfig`.

0 commit comments

Comments
 (0)