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: docs/en/reference/default-theme-carbon-ads.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Carbon Ads
2
2
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.
4
4
5
5
```js
6
6
exportdefault {
@@ -19,4 +19,4 @@ These values are used to call carbon CDN script as shown below.
Copy file name to clipboardExpand all lines: docs/en/reference/default-theme-config.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Default Theme Config
2
2
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:
4
4
5
5
```ts
6
6
exportdefault {
7
7
lang: 'en-US',
8
8
title: 'VitePress',
9
9
description: 'Vite & Vue powered static site generator.',
10
10
11
-
// Theme related configurations.
11
+
// Theme related configuration.
12
12
themeConfig: {
13
13
logo: '/logo.svg',
14
14
nav: [...],
@@ -17,19 +17,19 @@ export default {
17
17
}
18
18
```
19
19
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.
21
21
22
22
## i18nRouting
23
23
24
24
- Type: `boolean`
25
25
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`.
27
27
28
28
## logo
29
29
30
30
- Type: `ThemeableImage`
31
31
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.
33
33
34
34
```ts
35
35
exportdefault {
@@ -50,7 +50,7 @@ type ThemeableImage =
50
50
51
51
- Type: `string|false`
52
52
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.
54
54
55
55
```ts
56
56
exportdefault {
@@ -64,7 +64,7 @@ export default {
64
64
65
65
- Type: `NavItem`
66
66
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).
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).
116
116
117
117
```ts
118
118
exportdefault {
@@ -195,7 +195,7 @@ If you want to disable it for all viewports, you should use `outline: false` ins
195
195
- Type: `Outline|Outline['level'] |false`
196
196
- Level can be overridden per page via [frontmatter](./frontmatter-config#outline)
197
197
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:
199
199
200
200
```ts
201
201
interfaceOutline {
@@ -222,7 +222,7 @@ interface Outline {
222
222
223
223
- Type: `SocialLink[]`
224
224
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.
226
226
227
227
```ts
228
228
exportdefault {
@@ -256,9 +256,9 @@ interface SocialLink {
256
256
## footer
257
257
258
258
- Type: `Footer`
259
-
- Can be overridden per page via[frontmatter](./frontmatter-config#footer)
259
+
- Can be overridden per page using[frontmatter](./frontmatter-config#footer)
260
260
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.
262
262
263
263
```ts
264
264
exportdefault {
@@ -283,7 +283,7 @@ export interface Footer {
283
283
- Type: `EditLink`
284
284
- Can be overridden per page via [frontmatter](./frontmatter-config#editlink)
285
285
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.
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)
@@ -382,7 +382,7 @@ Learn more in [Default Theme: Carbon Ads](./default-theme-carbon-ads)
382
382
383
383
- Type: `DocFooter`
384
384
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).
Copy file name to clipboardExpand all lines: docs/en/reference/default-theme-edit-link.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Site-Level Config
4
4
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.
6
6
7
7
```js
8
8
exportdefault {
@@ -14,9 +14,9 @@ export default {
14
14
}
15
15
```
16
16
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.
18
18
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.
20
20
21
21
```js
22
22
exportdefault {
@@ -34,9 +34,7 @@ export default {
34
34
}
35
35
```
36
36
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.
40
38
41
39
```js
42
40
exportdefault {
@@ -51,7 +49,7 @@ export default {
51
49
52
50
## Frontmatter Config
53
51
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:
Copy file name to clipboardExpand all lines: docs/en/reference/default-theme-footer.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Footer
2
2
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.
4
4
5
5
```ts
6
6
exportdefault {
@@ -15,15 +15,15 @@ export default {
15
15
16
16
```ts
17
17
exportinterfaceFooter {
18
-
// The message shown right before copyright.
18
+
// The message shown before the copyright.
19
19
message?:string
20
20
21
21
// The actual copyright text.
22
22
copyright?:string
23
23
}
24
24
```
25
25
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.
27
27
28
28
```ts
29
29
exportdefault {
@@ -37,14 +37,14 @@ export default {
37
37
```
38
38
39
39
::: 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.
41
41
:::
42
42
43
43
Note that footer will not be displayed when the [SideBar](./default-theme-sidebar) is visible.
44
44
45
45
## Frontmatter Config
46
46
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:
0 commit comments