From 8fecbcbba2eef19f4adf3c95573f8330746335b7 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Tue, 29 Apr 2025 08:56:04 +0200 Subject: Indicate external links --- astro.config.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'astro.config.mjs') 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", + } + } + ] + ] + } }); -- cgit v1.3