Skip to content

Commit

Permalink
docs: Open external navigation links in a new tab (#3286)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Sep 29, 2024
1 parent c960b8c commit aa3ace3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/components/Navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export function Navigation({ navigation, className }) {
<li key={link.href} className="relative">
<Link href={link.href}>
<a
{...(link.href.startsWith('/')
? {}
: { target: '_blank', rel: 'noopener noreferrer' })}
className={clsx(
'block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full',
{
Expand Down

0 comments on commit aa3ace3

Please sign in to comment.