Skip to content

Commit 2382899

Browse files
Hdd87d0rich
andauthored
Make external links to be opened in new browser tab (#9)
* install rehype plugin and add config * fixed lint errors * Update nuxt.config.ts Co-authored-by: Nikolai Dorofeev <[email protected]> --------- Co-authored-by: Nikolai Dorofeev <[email protected]>
1 parent ed79483 commit 2382899

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

nuxt.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ export default defineNuxtConfig({
4040
documentDriven: true,
4141
highlight: {
4242
theme: 'one-dark-pro'
43+
},
44+
markdown: {
45+
rehypePlugins: {
46+
'rehype-external-links': {
47+
target: '_blank'
48+
}
49+
}
4350
}
4451
}
4552
})

package-lock.json

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"@tailwindcss/typography": "^0.5.8",
5959
"@types/mermaid": "^9.2.0",
6060
"nuxt": "^3.3.1",
61-
"nuxt-icon": "^0.3.3"
61+
"nuxt-icon": "^0.3.3",
62+
"rehype-external-links": "^2.1.0"
6263
}
6364
}

0 commit comments

Comments
 (0)