Skip to content

Commit

Permalink
docs($plugin): update
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Dec 9, 2018
1 parent 2b2b6d5 commit ecaa3a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
9 changes: 4 additions & 5 deletions packages/docs/docs/plugin/option-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,13 @@ Add a page with explicit content:
```js
module.exports = {
async additionalPages () {
const rp = require('request-promise');

// VuePress doesn't have request library built-in
// Note that VuePress doesn't have request library built-in
// you need to install it yourself.
const content = await rp('https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md');
const rp = require('request-promise')
const content = await rp('https://raw.githubusercontent.com/vuejs/vuepress/master/CHANGELOG.md')
return [
{
path: '/readme/',
path: '/changelog/',
content
}
]
Expand Down
13 changes: 6 additions & 7 deletions packages/docs/docs/zh/plugin/option-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export default {

## additionalPages

- 类型: `Array|Function`
- 类型: `Array|AsyncFunction`
- 默认值: `undefined`

增加一个指向某个 markdown 文件的页面:
Expand All @@ -379,14 +379,13 @@ module.exports = {
```js
module.exports = {
async additionalPages () {
const rp = require('request-promise');

// VuePress doesn't have request library built-in
// you need to install it yourself.
const content = await rp('https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md');
// 注意 VuePress 没有任何内置的请求库,
// 你需要自己安装它。
const rp = require('request-promise')
const content = await rp('https://raw.githubusercontent.com/vuejs/vuepress/master/CHANGELOG.md')
return [
{
path: '/readme/',
path: '/changelog/',
content
}
]
Expand Down

0 comments on commit ecaa3a8

Please sign in to comment.