Skip to content

Commit

Permalink
docs: add ignoreDeadLinks and alphabetize app configs (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
xfq committed Jun 26, 2022
1 parent 19b0758 commit a689f6b
Showing 1 changed file with 47 additions and 33 deletions.
80 changes: 47 additions & 33 deletions docs/config/app-configs.md
Expand Up @@ -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

- Type: `string`
Expand All @@ -27,57 +42,55 @@ export default {
}
```

## lang
## description

- 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
export default {
lang: 'en-US'
description: 'A VitePress site'
}
```

## title
## ignoreDeadLinks

- Type: `string`
- Default: `VitePress`
- Type: `boolean`
- 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
export default {
title: 'VitePress'
ignoreDeadLinks: true
}
```

## titleTemplate

- Type: `string | boolean`
## lang

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
export default {
title: 'VitePress',
titleTemplate: 'Vite & Vue powered static site generator'
lang: 'en-US'
}
```

## description
## lastUpdated

- Type: `string`
- Default: `A VitePress site`
- Type: `boolean`
- 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
export default {
description: 'A VitePress site'
lastUpdated: true
}
```

Expand Down Expand Up @@ -132,30 +145,31 @@ interface MarkdownOptions extends MarkdownIt.Options {
}
```

## appearance

- Type: `boolean`
- Default: `true`
## title

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
export default {
appearance: true
title: 'VitePress'
}
```

## lastUpdated
## titleTemplate

- Type: `boolean`
- Default: `false`
- Type: `string | boolean`

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
export default {
lastUpdated: true
title: 'VitePress',
titleTemplate: 'Vite & Vue powered static site generator'
}
```

0 comments on commit a689f6b

Please sign in to comment.