mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +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: [
|
redirects: [
|
||||||
{
|
{
|
||||||
// : string
|
to: '/docs/newDocPath', // string
|
||||||
to: '/docs/newDocPath',
|
from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'], // string | string[]
|
||||||
// : string | string[]
|
|
||||||
from: ['/docs/oldDocPathFrom2019', '/docs/legacyDocPathFrom2016'],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -545,7 +543,7 @@ module.exports = {
|
||||||
{
|
{
|
||||||
createRedirects: function (existingPath) {
|
createRedirects: function (existingPath) {
|
||||||
if (existingPath === '/docs/newDocPath') {
|
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