Add remark and rehype plugins

This commit is contained in:
pancakes 2024-04-24 19:08:39 +10:00
parent 260c8c8190
commit 0545a9dd99
3 changed files with 1280 additions and 1 deletions

1262
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,9 @@
"eslint": "^8.56.0",
"eslint-plugin-svelte": "^2.35.1",
"mdsvex": "^0.11.0",
"rehype-external-links": "^3.0.0",
"remark-emoji": "^4.0.1",
"remark-gfm": "^4.0.0",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",

View file

@ -1,6 +1,9 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from "mdsvex";
import emoji from "remark-emoji";
import gfm from "remark-gfm";
import rehypeExternalLinks from "rehype-external-links";
/** @type {import('@sveltejs/kit').Config} */
export default {
@ -18,6 +21,17 @@ export default {
preprocess: [
vitePreprocess(),
mdsvex({ extensions: [".md"] })
mdsvex({
extensions: [".md"],
remarkPlugins: [
emoji,
gfm
],
rehypePlugins: [
[rehypeExternalLinks, {
target: "_blank"
}]
]
})
]
};