open external links in new tab

This commit is contained in:
2026-05-05 18:08:15 -04:00
parent 0899304a62
commit 2b8cea8e50
5 changed files with 28 additions and 2 deletions
+4
View File
@@ -4,6 +4,7 @@ import alpinejs from '@astrojs/alpinejs';
import mdx from '@astrojs/mdx';
import { defineConfig } from 'astro/config';
import pagefind from 'astro-pagefind';
import rehypeExternalLinks from 'rehype-external-links';
// https://astro.build/config
export default defineConfig({
@@ -16,6 +17,9 @@ export default defineConfig({
dark: 'github-dark',
},
},
rehypePlugins: [
[rehypeExternalLinks, { target: '_blank', rel: ['noopener', 'noreferrer'] }],
],
},
integrations: [
mdx(),