Add more rehype plugins
This commit is contained in:
parent
0545a9dd99
commit
3f6267ea97
3 changed files with 20 additions and 0 deletions
17
package-lock.json
generated
17
package-lock.json
generated
|
@ -16,6 +16,7 @@
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-svelte": "^2.35.1",
|
"eslint-plugin-svelte": "^2.35.1",
|
||||||
"mdsvex": "^0.11.0",
|
"mdsvex": "^0.11.0",
|
||||||
|
"rehype-attr": "^3.0.3",
|
||||||
"rehype-external-links": "^3.0.0",
|
"rehype-external-links": "^3.0.0",
|
||||||
"remark-emoji": "^4.0.1",
|
"remark-emoji": "^4.0.1",
|
||||||
"remark-gfm": "^4.0.0",
|
"remark-gfm": "^4.0.0",
|
||||||
|
@ -2982,6 +2983,22 @@
|
||||||
"node": ">=8.10.0"
|
"node": ">=8.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/rehype-attr": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/rehype-attr/-/rehype-attr-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-Up50Xfra8tyxnkJdCzLBIBtxOcB2M1xdeKe1324U06RAvSjYm7ULSeoM+b/nYPQPVd7jsXJ9+39IG1WAJPXONw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"unified": "~11.0.0",
|
||||||
|
"unist-util-visit": "~5.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://jaywcjlove.github.io/#/sponsor"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/rehype-external-links": {
|
"node_modules/rehype-external-links": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/rehype-external-links/-/rehype-external-links-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/rehype-external-links/-/rehype-external-links-3.0.0.tgz",
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-svelte": "^2.35.1",
|
"eslint-plugin-svelte": "^2.35.1",
|
||||||
"mdsvex": "^0.11.0",
|
"mdsvex": "^0.11.0",
|
||||||
|
"rehype-attr": "^3.0.3",
|
||||||
"rehype-external-links": "^3.0.0",
|
"rehype-external-links": "^3.0.0",
|
||||||
"remark-emoji": "^4.0.1",
|
"remark-emoji": "^4.0.1",
|
||||||
"remark-gfm": "^4.0.0",
|
"remark-gfm": "^4.0.0",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import adapter from '@sveltejs/adapter-static';
|
import adapter from '@sveltejs/adapter-static';
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||||
import { mdsvex } from "mdsvex";
|
import { mdsvex } from "mdsvex";
|
||||||
|
import attr from "rehype-attr";
|
||||||
import emoji from "remark-emoji";
|
import emoji from "remark-emoji";
|
||||||
import gfm from "remark-gfm";
|
import gfm from "remark-gfm";
|
||||||
import rehypeExternalLinks from "rehype-external-links";
|
import rehypeExternalLinks from "rehype-external-links";
|
||||||
|
@ -28,6 +29,7 @@ export default {
|
||||||
gfm
|
gfm
|
||||||
],
|
],
|
||||||
rehypePlugins: [
|
rehypePlugins: [
|
||||||
|
[attr, { properties: 'attr' }],
|
||||||
[rehypeExternalLinks, {
|
[rehypeExternalLinks, {
|
||||||
target: "_blank"
|
target: "_blank"
|
||||||
}]
|
}]
|
||||||
|
|
Loading…
Reference in a new issue