From e1944ec7fdb3e09e773caf2f36129a723fde04ec Mon Sep 17 00:00:00 2001 From: Krishna Ayyalasomayajula Date: Mon, 1 Jun 2026 21:31:02 -0500 Subject: [PATCH] feat: add rehype-external-links for external link security --- app/posts/[slug]/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/posts/[slug]/page.tsx b/app/posts/[slug]/page.tsx index 6253aa2..27520a7 100644 --- a/app/posts/[slug]/page.tsx +++ b/app/posts/[slug]/page.tsx @@ -58,8 +58,12 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str options={{ mdxOptions: { remarkPlugins: [smartypants, remarkMath, remarkGfm], -rehypePlugins: [ + rehypePlugins: [ rehypeSlug, + [rehypeExternalLinks, { + target: '_blank', + rel: ['nofollow', 'noopener', 'noreferrer'], + }], rehypeAutolinkHeadings, [rehypePrettyCode, { theme: 'github-dark' }], rehypeKatex,