mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
add type comments to createRedirects doc
This commit is contained in:
parent
e60c063120
commit
f6d1b2b9ca
1 changed files with 3 additions and 5 deletions
|
@ -523,10 +523,8 @@ module.exports = {
|
|||
{
|
||||
redirects: [
|
||||
{
|
||||
// : string
|
||||
to: '/docs/newDocPath',
|
||||
// : string | string[]
|
||||
from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'],
|
||||
to: '/docs/newDocPath', // string
|
||||
from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'], // string | string[]
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -545,7 +543,7 @@ module.exports = {
|
|||
{
|
||||
createRedirects: function (existingPath) {
|
||||
if (existingPath === '/docs/newDocPath') {
|
||||
return ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'];
|
||||
return ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016']; // string | string[]
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue