Skip to content

Commit ecaa3a8

Browse files
committed
docs($plugin): update
1 parent 2b2b6d5 commit ecaa3a8

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

packages/docs/docs/plugin/option-api.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,13 @@ Add a page with explicit content:
377377
```js
378378
module.exports = {
379379
async additionalPages () {
380-
const rp = require('request-promise');
381-
382-
// VuePress doesn't have request library built-in
380+
// Note that VuePress doesn't have request library built-in
383381
// you need to install it yourself.
384-
const content = await rp('https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md');
382+
const rp = require('request-promise')
383+
const content = await rp('https://raw.githubusercontent.com/vuejs/vuepress/master/CHANGELOG.md')
385384
return [
386385
{
387-
path: '/readme/',
386+
path: '/changelog/',
388387
content
389388
}
390389
]

packages/docs/docs/zh/plugin/option-api.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ export default {
356356

357357
## additionalPages
358358

359-
- 类型: `Array|Function`
359+
- 类型: `Array|AsyncFunction`
360360
- 默认值: `undefined`
361361

362362
增加一个指向某个 markdown 文件的页面:
@@ -379,14 +379,13 @@ module.exports = {
379379
```js
380380
module.exports = {
381381
async additionalPages () {
382-
const rp = require('request-promise');
383-
384-
// VuePress doesn't have request library built-in
385-
// you need to install it yourself.
386-
const content = await rp('https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md');
382+
// 注意 VuePress 没有任何内置的请求库,
383+
// 你需要自己安装它。
384+
const rp = require('request-promise')
385+
const content = await rp('https://raw.githubusercontent.com/vuejs/vuepress/master/CHANGELOG.md')
387386
return [
388387
{
389-
path: '/readme/',
388+
path: '/changelog/',
390389
content
391390
}
392391
]

0 commit comments

Comments
 (0)