1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Merge pull request #41014 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2025-10-27 11:37:13 -07:00
committed by GitHub

View File

@@ -33,9 +33,12 @@ export default function permalinkRedirects(
}
// Exceptions where the `redirect_from` entries are too old
// Only replace /enterprise/ when it's at the start of the path followed by /admin/
// This handles legacy patterns like /enterprise/admin/... → /admin/...
// but preserves paths like /early-access/enterprise/... where enterprise is a directory name
frontmatterOldPath = frontmatterOldPath
.replace('/admin/guides/', '/admin/')
.replace('/enterprise/', '/')
.replace(/^\/enterprise\/admin\//, '/admin/')
permalinks.forEach((permalink, index) => {
// For the first supported permalink (the order is determined by lib/all-versions),