Skip to content

Commit ca5ac6f

Browse files
committed
docs: fix grammar in reference/
1 parent 300dea4 commit ca5ac6f

16 files changed

+161
-163
lines changed

docs/en/reference/default-theme-badge.md

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

3-
The badge lets you add status to your headers. For example, it could be useful to specify the section's type, or supported version.
3+
The badge component lets you add a status to your headers. For example, it can specify a section's type or supported version.
44

55
## Usage
66

7-
You may use the `Badge` component which is globally available.
7+
The `Badge` component is globally available everywhere.
88

99
```html
1010
### Title <Badge type="info" text="default" />
@@ -13,7 +13,7 @@ You may use the `Badge` component which is globally available.
1313
### Title <Badge type="danger" text="caution" />
1414
```
1515

16-
Code above renders like:
16+
This code will render as:
1717

1818
### Title <Badge type="info" text="default" />
1919
### Title <Badge type="tip" text="^1.9.0" />
@@ -22,7 +22,7 @@ Code above renders like:
2222

2323
## Custom Children
2424

25-
`<Badge>` accept `children`, which will be displayed in the badge.
25+
The `<Badge>` component's default slot will be rendered inside the badge.
2626

2727
```html
2828
### Title <Badge type="info">custom element</Badge>
@@ -32,7 +32,7 @@ Code above renders like:
3232

3333
## Customize Type Color
3434

35-
You can customize the style of badges by overriding css variables. The following are the default values:
35+
You can customize the style of badges by overriding CSS variables. The following are the default values:
3636

3737
```css
3838
:root {
@@ -56,7 +56,7 @@ You can customize the style of badges by overriding css variables. The following
5656

5757
## `<Badge>`
5858

59-
`<Badge>` component accepts following props:
59+
The `<Badge>` component accepts the following props:
6060

6161
```ts
6262
interface Props {

docs/en/reference/default-theme-carbon-ads.md

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

3-
VitePress has built in native support for [Carbon Ads](https://www.carbonads.net/). By defining the Carbon Ads credentials in config, VitePress will display ads on the page.
3+
VitePress has built in native support for [Carbon Ads](https://www.carbonads.net/). By defining the Carbon Ads credentials in the config, VitePress will display ads on the page.
44

55
```js
66
export default {
@@ -19,4 +19,4 @@ These values are used to call carbon CDN script as shown below.
1919
`//cdn.carbonads.com/carbon.js?serve=${code}&placement=${placement}`
2020
```
2121

22-
To learn more about Carbon Ads configuration, please visit [Carbon Ads website](https://www.carbonads.net/).
22+
To learn more about Carbon Ads configuration, please visit the [Carbon Ads website](https://www.carbonads.net/).

docs/en/reference/default-theme-config.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Default Theme Config
22

3-
Theme config lets you customize your theme. You can define theme config via the `themeConfig` option in the config file:
3+
The theme config lets you customize your theme. You can define it using the `themeConfig` option in the config file:
44

55
```ts
66
export default {
77
lang: 'en-US',
88
title: 'VitePress',
99
description: 'Vite & Vue powered static site generator.',
1010

11-
// Theme related configurations.
11+
// Theme related configuration.
1212
themeConfig: {
1313
logo: '/logo.svg',
1414
nav: [...],
@@ -17,19 +17,19 @@ export default {
1717
}
1818
```
1919

20-
**The options documented on this page only apply to the default theme.** Different themes expect different theme config. When using a custom theme, the theme config object will be passed to the theme so the theme can define conditional behavior based on it.
20+
**The options documented on this page only apply to the default theme.** Different themes will expect different theme options. When using a custom theme, the theme config object will be passed to the theme directly, so the theme can define conditional behavior based on it.
2121

2222
## i18nRouting
2323

2424
- Type: `boolean`
2525

26-
Changing locale to say `zh` will change the URL from `/foo` (or `/en/foo/`) to `/zh/foo`. You can disable this behavior by setting `themeConfig.i18nRouting` to `false`.
26+
Changing the locale to `zh` will change the URL from `/foo` (or `/en/foo/`) to `/zh/foo`. You can disable this behavior by setting `themeConfig.i18nRouting` to `false`.
2727

2828
## logo
2929

3030
- Type: `ThemeableImage`
3131

32-
Logo file to display in nav bar, right before the site title. Accepts a path string, or an object to set a different logo for light/dark mode.
32+
This is the logo file to display in the navigation bar, before the site title. It accepts a path string or an object to set a different logo for light/dark mode.
3333

3434
```ts
3535
export default {
@@ -50,7 +50,7 @@ type ThemeableImage =
5050
5151
- Type: `string | false`
5252
53-
You can customize this item to replace the default site title (`title` in app config) in nav. When set to `false`, title in nav will be disabled. Useful when you have `logo` that already contains the site title text.
53+
You can customize this item to replace the default site title (`title` in app config) in nav. When set to `false`, the navigation title will be disabled. This option is useful when you have a `logo` that already contains the site title text.
5454
5555
```ts
5656
export default {
@@ -64,7 +64,7 @@ export default {
6464

6565
- Type: `NavItem`
6666

67-
The configuration for the nav menu item. More details in [Default Theme: Nav](./default-theme-nav#navigation-links).
67+
The configuration for navigation menu items. More details in [Default Theme: Nav](./default-theme-nav#navigation-links).
6868

6969
```ts
7070
export default {
@@ -112,7 +112,7 @@ interface NavItemWithChildren {
112112

113113
- Type: `Sidebar`
114114

115-
The configuration for the sidebar menu item. More details in [Default Theme: Sidebar](./default-theme-sidebar).
115+
The configuration for sidebar menu items. More details in [Default Theme: Sidebar](./default-theme-sidebar).
116116

117117
```ts
118118
export default {
@@ -195,7 +195,7 @@ If you want to disable it for all viewports, you should use `outline: false` ins
195195
- Type: `Outline | Outline['level'] | false`
196196
- Level can be overridden per page via [frontmatter](./frontmatter-config#outline)
197197
198-
Setting this value to `false` prevents rendering of outline container. Refer this interface for more details:
198+
Setting this value to `false` prevents rendering of outline container. Refer to this interface for more details:
199199
200200
```ts
201201
interface Outline {
@@ -222,7 +222,7 @@ interface Outline {
222222

223223
- Type: `SocialLink[]`
224224

225-
You may define this option to show your social account links with icons in nav.
225+
You can define this option to show social account links with icons in the navigation bar.
226226

227227
```ts
228228
export default {
@@ -256,9 +256,9 @@ interface SocialLink {
256256
## footer
257257

258258
- Type: `Footer`
259-
- Can be overridden per page via [frontmatter](./frontmatter-config#footer)
259+
- Can be overridden per page using [frontmatter](./frontmatter-config#footer)
260260

261-
Footer configuration. You can add a message or copyright text on the footer, however, it will only be displayed when the page doesn't contain a sidebar. This is due to design concerns.
261+
You can add a message and/or copyright text on the footer using this option. However, it will only be displayed when the page doesn't contain a sidebar, due to design concerns.
262262

263263
```ts
264264
export default {
@@ -283,7 +283,7 @@ export interface Footer {
283283
- Type: `EditLink`
284284
- Can be overridden per page via [frontmatter](./frontmatter-config#editlink)
285285

286-
Edit Link lets you display a link to edit the page on Git management services such as GitHub, or GitLab. See [Default Theme: Edit Link](./default-theme-edit-link) for more details.
286+
You can display a link to edit each documentation page at the bottom of the page. See [Default Theme: Edit Link](./default-theme-edit-link) for more details.
287287

288288
```ts
289289
export default {
@@ -342,7 +342,7 @@ export interface LastUpdatedOptions {
342342

343343
- Type: `AlgoliaSearch`
344344

345-
An option to support searching your docs site using [Algolia DocSearch](https://docsearch.algolia.com/docs/what-is-docsearch). Learn more in [Default Theme: Search](./default-theme-search)
345+
An option to support searching your site with [Algolia DocSearch](https://docsearch.algolia.com/docs/what-is-docsearch). Learn more in [Default Theme: Search](./default-theme-search)
346346

347347
```ts
348348
export interface AlgoliaSearchOptions extends DocSearchProps {
@@ -382,7 +382,7 @@ Learn more in [Default Theme: Carbon Ads](./default-theme-carbon-ads)
382382

383383
- Type: `DocFooter`
384384

385-
Can be used to customize text appearing above previous and next links. Helpful if not writing docs in English. Also can be used to disable prev/next links globally. If you want to selectively enable/disable prev/next links, you can use [frontmatter](./default-theme-prev-next-links).
385+
Can be used to customize text appearing above previous and next links. Helpful if not writing docs in English. Also can be used to disable prev/next links globally. If you want to selectively enable/disable previous/next links per-page, you can use [frontmatter](./default-theme-prev-next-links).
386386

387387
```ts
388388
export default {
@@ -407,35 +407,35 @@ export interface DocFooter {
407407
- Type: `string`
408408
- Default: `Appearance`
409409

410-
Can be used to customize the dark mode switch label. This label is only displayed in the mobile view.
410+
Can be used to customize the dark mode switch label. This label is only displayed on mobile.
411411

412412
## lightModeSwitchTitle
413413

414414
- Type: `string`
415415
- Default: `Switch to light theme`
416416

417-
Can be used to customize the light mode switch title that appears on hovering.
417+
Can be used to customize the light mode switch title that appears on hover.
418418

419419
## darkModeSwitchTitle
420420

421421
- Type: `string`
422422
- Default: `Switch to dark theme`
423423

424-
Can be used to customize the dark mode switch title that appears on hovering.
424+
Can be used to customize the dark mode switch title that appears on hover.
425425

426426
## sidebarMenuLabel
427427

428428
- Type: `string`
429429
- Default: `Menu`
430430

431-
Can be used to customize the sidebar menu label. This label is only displayed in the mobile view.
431+
Can be used to customize the sidebar menu label. This label is only displayed on mobile.
432432

433433
## returnToTopLabel
434434

435435
- Type: `string`
436436
- Default: `Return to top`
437437

438-
Can be used to customize the label of the return to top button. This label is only displayed in the mobile view.
438+
Can be used to customize the label of the return to top button. This label is only displayed on mobile.
439439

440440
## langMenuLabel
441441

@@ -456,7 +456,7 @@ Can be used to customize the label of the skip to content link. This link is sho
456456
- Type: `boolean`
457457
- Default: `false`
458458

459-
Whether to show an external link icon next to external links in markdown.
459+
Whether to show an external link icon next to external links in Markdown.
460460

461461
## `useLayout` <Badge type="info" text="composable" />
462462

docs/en/reference/default-theme-edit-link.md

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

33
## Site-Level Config
44

5-
Edit Link lets you display a link to edit the page on Git management services such as GitHub, or GitLab. To enable it, add `themeConfig.editLink` options to your config.
5+
You can display a link to edit each documentation page at the bottom of the page. To enable it, add `themeConfig.editLink` options to your config.
66

77
```js
88
export default {
@@ -14,9 +14,9 @@ export default {
1414
}
1515
```
1616

17-
The `pattern` option defines the URL structure for the link, and `:path` is going to be replaced with the page path.
17+
The `pattern` option defines the URL structure for the link, and the `:path` placeholder is replaced with the page path.
1818

19-
You can also put a pure function that accepts [`PageData`](./runtime-api#usedata) as the argument and returns the URL string.
19+
You can also use a callback that takes [`PageData`](./runtime-api#usedata) as the argument and returns the URL string for additional customizability. This will be executed in the browser and hence shouldn't have side effects.
2020

2121
```js
2222
export default {
@@ -34,9 +34,7 @@ export default {
3434
}
3535
```
3636

37-
It should not have side-effects nor access anything outside of its scope since it will be serialized and executed in the browser.
38-
39-
By default, this will add the link text "Edit this page" at the bottom of the doc page. You may customize this text by defining the `text` option.
37+
By default, this option will add the link text "Edit this page" at the bottom of the doc page. You can customize this text by defining the `text` option.
4038

4139
```js
4240
export default {
@@ -51,7 +49,7 @@ export default {
5149

5250
## Frontmatter Config
5351

54-
This can be disabled per-page using the `editLink` option on frontmatter:
52+
This can be disabled per-page using the `editLink` option in each individual page's frontmatter:
5553

5654
```yaml
5755
---

docs/en/reference/default-theme-footer.md

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

3-
VitePress will display global footer at the bottom of the page when `themeConfig.footer` is present.
3+
VitePress will display a global footer at the bottom of the page when `themeConfig.footer` is present.
44

55
```ts
66
export default {
@@ -15,15 +15,15 @@ export default {
1515

1616
```ts
1717
export interface Footer {
18-
// The message shown right before copyright.
18+
// The message shown before the copyright.
1919
message?: string
2020

2121
// The actual copyright text.
2222
copyright?: string
2323
}
2424
```
2525

26-
The above configuration also supports HTML strings. So, for example, if you want to configure footer text to have some links, you can adjust the configuration as follows:
26+
You can additionally directly embed HTML strings in the configuration if you want to add links or markup to the footer.
2727

2828
```ts
2929
export default {
@@ -37,14 +37,14 @@ export default {
3737
```
3838

3939
::: warning
40-
Only inline elements can be used in `message` and `copyright` as they are rendered inside a `<p>` element. If you want to add block elements, consider using [`layout-bottom`](../guide/extending-default-theme#layout-slots) slot instead.
40+
You can only use inline elements in `message` and `copyright`, as they are rendered inside a `<p>` element. If you want to add block elements, consider using the [`layout-bottom`](../guide/extending-default-theme#layout-slots) slot instead.
4141
:::
4242

4343
Note that footer will not be displayed when the [SideBar](./default-theme-sidebar) is visible.
4444

4545
## Frontmatter Config
4646

47-
This can be disabled per-page using the `footer` option on frontmatter:
47+
This can be disabled per-page using the `footer` option in each individual page's frontmatter:
4848

4949
```yaml
5050
---

0 commit comments

Comments
 (0)