Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 78a632b

Browse files
Fix Edit on GitHub button doesn't take you to GitHub (#3615)
1 parent 4927e96 commit 78a632b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎.changeset/famous-starfishes-love.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Fix edit on GitHub button doesn't take you to GitHub

‎packages/gitbook/src/components/PageBody/PageHeader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { AncestorRevisionPage } from '@/lib/pages';
33
import { tcls } from '@/lib/tailwind';
44
import type { RevisionPageDocument } from '@gitbook/api';
55
import { Icon } from '@gitbook/icons';
6+
import urlJoin from 'url-join';
67
import { getPDFURLSearchParams } from '../PDF';
78
import { PageActionsDropdown } from '../PageActions/PageActionsDropdown';
89
import { PageIcon } from '../PageIcon';
@@ -45,7 +46,7 @@ export async function PageHeader(props: {
4546
page.git
4647
? {
4748
provider: context.space?.gitSync?.installationProvider,
48-
url: context.linker.toPathInSpace(page.path),
49+
url: urlJoin(context.space.gitSync.url,page.git.path),
4950
}
5051
: undefined
5152
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /