Merge pull request #19313 from antobinary/docs-25-fix

docs: Fix for 2.5 legacy docs branch
This commit is contained in:
Anton Georgiev 2023-12-07 16:25:17 -05:00 committed by GitHub
commit 491d09c83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ const config = {
lastVersion: '2.7', lastVersion: '2.7',
includeCurrentVersion: false, includeCurrentVersion: false,
versions: { versions: {
'2.5': { '2.5-legacy': {
banner: 'none' banner: 'none'
}, },
'2.6': { '2.6': {
@ -111,6 +111,11 @@ const config = {
// creates new routes /dev/something pointing to /development // creates new routes /dev/something pointing to /development
redirect_list.push( path.replace("/development", "/dev") ); redirect_list.push( path.replace("/development", "/dev") );
} }
// redirect old links to the now modified url (includes -legacy)
if ( path.startsWith("/2.5") ) {
redirect_list.push( path.replace("/2.5", "/2.5-legacy") );
}
return redirect_list; return redirect_list;
}, },
} }