File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -377,14 +377,13 @@ Add a page with explicit content:
377
377
``` js
378
378
module .exports = {
379
379
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
383
381
// 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' )
385
384
return [
386
385
{
387
- path: ' /readme /' ,
386
+ path: ' /changelog /' ,
388
387
content
389
388
}
390
389
]
Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ export default {
356
356
357
357
## additionalPages
358
358
359
- - 类型: ` Array|Function `
359
+ - 类型: ` Array|AsyncFunction `
360
360
- 默认值: ` undefined `
361
361
362
362
增加一个指向某个 markdown 文件的页面:
@@ -379,14 +379,13 @@ module.exports = {
379
379
``` js
380
380
module .exports = {
381
381
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' )
387
386
return [
388
387
{
389
- path: ' /readme /' ,
388
+ path: ' /changelog /' ,
390
389
content
391
390
}
392
391
]
You can’t perform that action at this time.
0 commit comments