support a "hierarchy of fallbacks" for versioned redirects
This commit is contained in:
@@ -6,6 +6,12 @@ import enterpriseServerReleases from './enterprise-server-releases.js'
|
||||
const versionDelimiter = '@'
|
||||
const latestNonNumberedRelease = 'latest'
|
||||
|
||||
// Note this array is **in order** of the versions the site should try to fall back to if
|
||||
// no version is provided in a URL. For example, if /foo refers to a page that is available
|
||||
// in all versions, we should not redirect it (because /foo is the correct FPT versioned URL).
|
||||
// But if /foo refers to a page that is only available in GHEC and GHES, we should redirect it
|
||||
// to /enterprise-cloud@latest/foo (since GHEC comes first in the hierarchy of version fallbacks).
|
||||
// The implementation lives in lib/redirects/permalinks.js.
|
||||
const plans = [
|
||||
{
|
||||
// free-pro-team is **not** a user-facing version and is stripped from URLs.
|
||||
|
||||
Reference in New Issue
Block a user