Skip to content

Commit 879c512

Browse files
committed
add oneoff redirect
1 parent e046f19 commit 879c512

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

lib/redirects/get-old-paths-from-permalink.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ module.exports = function getOldPathsFromPath (currentPath, languageCode, curren
9999
}
100100
// ------ END MODERN VERSION FORMAT REPLACEMENTS ------//
101101

102+
// ------ BEGIN ONEOFF REPLACEMENTS ------//
103+
104+
// create special old path /enterprise-server-releases from current path /enterprise-server@<release>/admin/all-releases
105+
if (versionSatisfiesRange(currentVersion, `=${latest}`) && currentPath.endsWith('/admin/all-releases')) {
106+
oldPaths.add('/enterprise-server-releases')
107+
}
108+
109+
// ------ END ONEOFF REPLACEMENTS ------//
110+
102111
// For each old path added to the set above, do the following...
103112
(new Set(oldPaths)).forEach(oldPath => {
104113
// for English only, remove language code

0 commit comments

Comments
 (0)