docs: fix archive links (#9987)
This commit is contained in:
parent
75a136e0de
commit
19852497a2
@ -280,10 +280,19 @@ const config = {
|
|||||||
value: '<b>Archived versions</b>',
|
value: '<b>Archived versions</b>',
|
||||||
},
|
},
|
||||||
...archivedVersions.map(version => {
|
...archivedVersions.map(version => {
|
||||||
|
const parts = version.split('.').map(item => {
|
||||||
|
return Number(item);
|
||||||
|
});
|
||||||
|
if (parts[0] <= 19 && parts[1] <= 2 && parts[2] <= 2) {
|
||||||
return {
|
return {
|
||||||
label: version,
|
label: version,
|
||||||
href: `https://github.com/puppeteer/puppeteer/blob/v${version}/docs/api/index.md`,
|
href: `https://github.com/puppeteer/puppeteer/blob/v${version}/docs/api/index.md`,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
label: version,
|
||||||
|
href: `https://github.com/puppeteer/puppeteer/blob/puppeteer-v${version}/docs/api/index.md`,
|
||||||
|
};
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user