diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-04-29 08:56:04 +0200 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-04-29 08:57:05 +0200 |
| commit | 8fecbcbba2eef19f4adf3c95573f8330746335b7 (patch) | |
| tree | e5f20895c0bbe1ba85026f2be15894eb622ec49a /astro.config.mjs | |
| parent | 8cb952f30798d545f5d0f0690ab02df7eb978a74 (diff) | |
Indicate external links
Diffstat (limited to 'astro.config.mjs')
| -rw-r--r-- | astro.config.mjs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/astro.config.mjs b/astro.config.mjs index 19df8a3..b4fe6c6 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,7 @@ import { defineConfig } from "astro/config"; import mdx from "@astrojs/mdx"; import icon from "astro-icon"; +import rehypeExternalLinks from "rehype-external-links"; export default defineConfig({ compressHTML: true, @@ -21,4 +22,17 @@ export default defineConfig({ inlineStylesheets: "never", }, scopedStyleStrategy: "where", + markdown: { + rehypePlugins: [ + [ + rehypeExternalLinks, + { + "rel": ["nofollow", "noopener"], + "properties": { + "className": "external", + } + } + ] + ] + } }); |
