-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsvelte.config.js
46 lines (43 loc) · 967 Bytes
/
svelte.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import adapter from '@sveltejs/adapter-cloudflare';
import { mdsvex } from 'mdsvex';
import rehypePicture from 'rehype-picture';
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypeSlug from 'rehype-slug'
import rehypeToc from 'rehype-toc'
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
extensions: ['.svelte', '.md'],
preprocess: [
mdsvex({
extensions: ['.md'],
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, {
behavior: "wrap",
}],
[rehypeToc, {
cssClasses: {
list: "space-y-2",
listItem: "my-2",
},
}],
[
rehypePicture,
{
jpg: { webp: 'image/webp', jp2: 'image/jp2' }
}
]
]
}),
preprocess({
postcss: true
})
],
kit: {
adapter: adapter()
}
};
export default config;