1
0
mirror of synced 2026-01-08 12:01:53 -05:00

Merge pull request #33499 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-06-13 12:27:12 -07:00
committed by GitHub

View File

@@ -68,6 +68,10 @@ export async function validateDocsUrl(docsUrls: DocsUrls, { checkFragments = fal
redirects,
pages,
})
if (redirect && isEnterpriseCloudRedirectOnly(pageURL, redirect)) {
// Ignore this one. It just added enterprise-cloud@latest to the URL.
continue
}
if (redirect) {
redirectedPage = pages[redirect]
if (!redirectedPage) {
@@ -103,6 +107,12 @@ export async function validateDocsUrl(docsUrls: DocsUrls, { checkFragments = fal
return checks
}
function isEnterpriseCloudRedirectOnly(originalUrl: string, redirectUrl: string) {
// A lot of URLs don't work in free-pro-team so all they do is redirect
// from {OLD-URL} to "/enterprise-count@latest/{OLD-URL}"
return redirectUrl.replace('/enterprise-cloud@latest', '') === originalUrl
}
async function renderInnerHTML(page: Page, permalink: Permalink) {
const next = () => {}
const res = {}