From 7eb3bfe69a3335d52ac62c226a858214e8dc7833 Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Thu, 25 Mar 2021 14:04:43 -0700 Subject: [PATCH] Make external links open in a new browser window --- build/engines.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/engines.js b/build/engines.js index b084345..9f9d9f4 100644 --- a/build/engines.js +++ b/build/engines.js @@ -22,6 +22,13 @@ const markdownEngines = { typographer: true, }) .enable('image') + .use(require('markdown-it-link-attributes'), { + pattern: /^https?:/, + attrs: { + target: '_blank', + rel: 'noopener', + }, + }) .use(require('markdown-it-anchor'), { permalink: true, permalinkClass: 'header-link',