Make external links open in a new browser window

This commit is contained in:
Jocelyn Badgley (Twipped) 2021-03-25 14:04:43 -07:00
parent d6c975ab37
commit 7eb3bfe69a

View File

@ -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',