docs: add `ignoreDeadLinks` and alphabetize app configs (#862)

pull/865/head
Fuqiao Xue 3 years ago committed by GitHub
parent 19b0758a04
commit a689f6b6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,6 +12,21 @@ export default {
} }
``` ```
## appearance
- Type: `boolean`
- Default: `true`
Whether to enable "Dark Mode" or not. If the option is set to `true`, it adds `.dark` class to the `<html>` tag depending on the users preference.
It also injects inline script that tries to read users settings from local storage by `vitepress-theme-appearance` key and restores users preferred color mode.
```ts
export default {
appearance: true
}
```
## base ## base
- Type: `string` - Type: `string`
@ -27,57 +42,55 @@ export default {
} }
``` ```
## lang ## description
- Type: `string` - Type: `string`
- Default: `en-US` - Default: `A VitePress site`
The lang attribute for the site. This will render as a `<html lang="en-US">` tag in the page HTML. Description for the site. This will render as a `<meta>` tag in the page HTML.
```ts ```ts
export default { export default {
lang: 'en-US' description: 'A VitePress site'
} }
``` ```
## title ## ignoreDeadLinks
- Type: `string` - Type: `boolean`
- Default: `VitePress` - Default: `false`
Title for the site. This will be displayed in the nav bar. Also used as the suffix for all page titles unless `titleTemplate` is defined. When set to `true`, VitePress will not fail builds due to dead links.
```ts ```ts
export default { export default {
title: 'VitePress' ignoreDeadLinks: true
} }
``` ```
## titleTemplate ## lang
- Type: `string | boolean`
The suffix for the title. For example, if you set `title` as `VitePress` and set `titleTemplate` as `My Site`, the html title becomes `VitePress | My Site`. - Type: `string`
- Default: `en-US`
Set `false` to disable the feature. If the option is `undefined`, then the value of `title` option will be used. The lang attribute for the site. This will render as a `<html lang="en-US">` tag in the page HTML.
```ts ```ts
export default { export default {
title: 'VitePress', lang: 'en-US'
titleTemplate: 'Vite & Vue powered static site generator'
} }
``` ```
## description ## lastUpdated
- Type: `string` - Type: `boolean`
- Default: `A VitePress site` - Default: `false`
Description for the site. This will render as a `<meta>` tag in the page HTML. Use git commit to get the timestamp. This option enables the default theme to display the page's last updated time. You can customize the text via [`themeConfig.lastUpdatedText`](theme-configs#lastupdatedtext) option.
```ts ```ts
export default { export default {
description: 'A VitePress site' lastUpdated: true
} }
``` ```
@ -132,30 +145,31 @@ interface MarkdownOptions extends MarkdownIt.Options {
} }
``` ```
## appearance ## title
- Type: `boolean`
- Default: `true`
Whether to enable "Dark Mode" or not. If the option is set to `true`, it adds `.dark` class to the `<html>` tag depending on the users preference. - Type: `string`
- Default: `VitePress`
It also injects inline script that tries to read users settings from local storage by `vitepress-theme-appearance` key and restores users preferred color mode. Title for the site. This will be displayed in the nav bar. Also used as the suffix for all page titles unless `titleTemplate` is defined.
```ts ```ts
export default { export default {
appearance: true title: 'VitePress'
} }
``` ```
## lastUpdated ## titleTemplate
- Type: `boolean` - Type: `string | boolean`
- Default: `false`
Use git commit to get the timestamp. This option enables the default theme to display the page's last updated time. You can customize the text via [`themeConfig.lastUpdatedText`](theme-configs#lastupdatedtext) option. The suffix for the title. For example, if you set `title` as `VitePress` and set `titleTemplate` as `My Site`, the html title becomes `VitePress | My Site`.
Set `false` to disable the feature. If the option is `undefined`, then the value of `title` option will be used.
```ts ```ts
export default { export default {
lastUpdated: true title: 'VitePress',
titleTemplate: 'Vite & Vue powered static site generator'
} }
``` ```

Loading…
Cancel
Save