Skip to content

Commit 7672bed

Browse files
committed
Always open header logo link in the current tab
1 parent 32d6f58 commit 7672bed

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/gitbook/src/components/Header/HeaderLogo.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export async function HeaderLogo(props: HeaderLogoProps) {
2121
return (
2222
<Link
2323
href={linker.toAbsoluteURL(linker.toPathInSite(''))}
24+
target="_self"
2425
className={tcls('group/headerlogo', 'min-w-0', 'shrink', 'flex', 'items-center')}
2526
>
2627
{customization.header.logo ? (

packages/gitbook/src/components/primitives/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const Link = React.forwardRef(function Link(
8989
{...domProps}
9090
href={href}
9191
onClick={onClick}
92-
{...(externalLinksTarget === SiteExternalLinksTarget.Blank
92+
{...(externalLinksTarget === SiteExternalLinksTarget.Blank && !domProps.target
9393
? { target: '_blank', rel: 'noopener noreferrer' }
9494
: {})}
9595
>

0 commit comments

Comments
 (0)