docs: add basic config reference

pull/156/head
Kia King Ishii 4 years ago
parent bb28ac0cbe
commit 136a56e74d

@ -13,7 +13,7 @@ module.exports = {
nav: [ nav: [
{ text: 'Guide', link: '/' }, { text: 'Guide', link: '/' },
{ text: 'Config Reference', link: '/config/' }, { text: 'Config Reference', link: '/config/basics' },
{ {
text: 'Release Notes', text: 'Release Notes',
link: 'https://github.com/vuejs/vitepress/releases' link: 'https://github.com/vuejs/vitepress/releases'
@ -51,5 +51,10 @@ function getGuideSidebar() {
} }
function getConfigSidebar() { function getConfigSidebar() {
return [{ text: 'Config Reference', link: '/config/' }] return [
{
text: 'App Config',
children: [{ text: 'Basics', link: '/config/basics' }]
}
]
} }

@ -0,0 +1,57 @@
# App Config: Basics
## base
- Type: `string`
- Default: `/`
The base URL the site will be deployed at. You will need to set this if you plan to deploy your site under a sub path, for example, GitHub pages. If you plan to deploy your site to `https://foo.github.io/bar/`, then you should set base to `'/bar/'`. It should always start and end with a slash.
The `base` is automatically prepended to all the URLs that start with `/` in other options, so you only need to specify it once.
```js
module.exports = {
base: '/base/'
}
```
## lang
- Type: `string`
- Default: `en-US`
The `lang` attribute for the site. This will render as a `<html lang="en-US">` tag in the page HTML.
Note that the `lang` attribute will only be added when building the site via `vitepress build`. You will not see this rendered during `vitepress dev`.
```js
module.exports = {
lang: 'en-US'
}
```
## title
- Type: `string`
- Default: `VitePress`
Title for the site. This will be the prefix for all page titles, and displayed in the navbar.
```js
module.exports = {
title: 'VitePress'
}
```
## Description
- Type: `string`
- Default: `A VitePress site`
Description for the site. This will render as a `<meta>` tag in the page HTML.
```js
module.exports = {
title: 'A VitePress site'
}
```

@ -1,3 +0,0 @@
# Config Reference
Coming soon...
Loading…
Cancel
Save