Skip to content

Commit 378935f

Browse files
committed
Fix test
1 parent 1cb6c44 commit 378935f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/gitbook/e2e/internal.spec.ts

+6
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,12 @@ const testCases: TestsCase[] = [
806806
},
807807
screenshot: false,
808808
},
809+
],
810+
},
811+
{
812+
name: 'Site Redirects with sections',
813+
contentBaseURL: 'https://gitbook-open-e2e-sites.gitbook.io/sections/',
814+
tests: [
809815
{
810816
// This test that a redirect that incudes a section path works
811817
name: 'Redirect to Quickstart page',

packages/gitbook/src/components/SitePage/fetch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async function resolvePage(context: GitBookSiteContext, params: PagePathParams |
8686
})
8787
);
8888
if (resolvedSiteRedirect) {
89-
return redirect(resolvedSiteRedirect.target);
89+
return redirect(linker.toLinkForContent(resolvedSiteRedirect.target));
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)