Skip to content

Commit 1a3d7e3

Browse files
Update sidebar external link to open in new tab (#569)
* Update external link to open in new tab Add target and rel attributes to external links for security. * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 673c771 commit 1a3d7e3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/DocsLayout.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,12 @@ export function DocsLayout({
219219
return (
220220
<li key={i}>
221221
{child.to.startsWith('http') ? (
222-
<a href={child.to} className={linkClasses}>
222+
<a
223+
href={child.to}
224+
className={linkClasses}
225+
target="_blank"
226+
rel="noopener noreferrer"
227+
>
223228
{child.label}
224229
</a>
225230
) : (

0 commit comments

Comments
 (0)