Skip to content

docs: fix grammar in reference/ #4893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/en/reference/default-theme-badge.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Badge

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

## Usage

You may use the `Badge` component which is globally available.
The `Badge` component is globally available everywhere.

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

Code above renders like:
This code will render as:

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

## Custom Children

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

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

## Customize Type Color

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

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

## `<Badge>`

`<Badge>` component accepts following props:
The `<Badge>` component accepts the following props:

```ts
interface Props {
Expand Down
4 changes: 2 additions & 2 deletions docs/en/reference/default-theme-carbon-ads.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Carbon Ads

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.
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.

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

To learn more about Carbon Ads configuration, please visit [Carbon Ads website](https://www.carbonads.net/).
To learn more about Carbon Ads configuration, please visit the [Carbon Ads website](https://www.carbonads.net/).
42 changes: 21 additions & 21 deletions docs/en/reference/default-theme-config.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Default Theme Config

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

```ts
export default {
lang: 'en-US',
title: 'VitePress',
description: 'Vite & Vue powered static site generator.',

// Theme related configurations.
// Theme related configuration.
themeConfig: {
logo: '/logo.svg',
nav: [...],
Expand All @@ -17,19 +17,19 @@ export default {
}
```

**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.
**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.

## i18nRouting

- Type: `boolean`

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`.
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`.

## logo

- Type: `ThemeableImage`

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.
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.

```ts
export default {
Expand All @@ -50,7 +50,7 @@ type ThemeableImage =

- Type: `string | false`

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.
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.

```ts
export default {
Expand All @@ -64,7 +64,7 @@ export default {

- Type: `NavItem`

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

```ts
export default {
Expand Down Expand Up @@ -112,7 +112,7 @@ interface NavItemWithChildren {

- Type: `Sidebar`

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

```ts
export default {
Expand Down Expand Up @@ -195,7 +195,7 @@ If you want to disable it for all viewports, you should use `outline: false` ins
- Type: `Outline | Outline['level'] | false`
- Level can be overridden per page via [frontmatter](./frontmatter-config#outline)

Setting this value to `false` prevents rendering of outline container. Refer this interface for more details:
Setting this value to `false` prevents rendering of outline container. Refer to this interface for more details:

```ts
interface Outline {
Expand All @@ -222,7 +222,7 @@ interface Outline {

- Type: `SocialLink[]`

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

```ts
export default {
Expand Down Expand Up @@ -256,9 +256,9 @@ interface SocialLink {
## footer

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

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.
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.

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

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.
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.

```ts
export default {
Expand Down Expand Up @@ -342,7 +342,7 @@ export interface LastUpdatedOptions {

- Type: `AlgoliaSearch`

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)
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)

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

- Type: `DocFooter`

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).
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).

```ts
export default {
Expand All @@ -407,35 +407,35 @@ export interface DocFooter {
- Type: `string`
- Default: `Appearance`

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

## lightModeSwitchTitle

- Type: `string`
- Default: `Switch to light theme`

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

## darkModeSwitchTitle

- Type: `string`
- Default: `Switch to dark theme`

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

## sidebarMenuLabel

- Type: `string`
- Default: `Menu`

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

## returnToTopLabel

- Type: `string`
- Default: `Return to top`

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

## langMenuLabel

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

Whether to show an external link icon next to external links in markdown.
Whether to show an external link icon next to external links in Markdown.

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

Expand Down
12 changes: 5 additions & 7 deletions docs/en/reference/default-theme-edit-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Site-Level Config

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.
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.

```js
export default {
Expand All @@ -14,9 +14,9 @@ export default {
}
```

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

You can also put a pure function that accepts [`PageData`](./runtime-api#usedata) as the argument and returns the URL string.
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.

```js
export default {
Expand All @@ -34,9 +34,7 @@ export default {
}
```

It should not have side-effects nor access anything outside of its scope since it will be serialized and executed in the browser.

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.
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.

```js
export default {
Expand All @@ -51,7 +49,7 @@ export default {

## Frontmatter Config

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

```yaml
---
Expand Down
10 changes: 5 additions & 5 deletions docs/en/reference/default-theme-footer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Footer

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

```ts
export default {
Expand All @@ -15,15 +15,15 @@ export default {

```ts
export interface Footer {
// The message shown right before copyright.
// The message shown before the copyright.
message?: string

// The actual copyright text.
copyright?: string
}
```

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:
You can additionally directly embed HTML strings in the configuration if you want to add links or markup to the footer.

```ts
export default {
Expand All @@ -37,14 +37,14 @@ export default {
```

::: warning
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.
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.
:::

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

## Frontmatter Config

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

```yaml
---
Expand Down
Loading
Loading