forked from swyxio/swyxkit
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
57 lines (53 loc) · 1.12 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
import preprocess from 'svelte-preprocess';
import adapter from '@svelterun/adapter-auto';
import { mdsvex } from 'mdsvex';
import remarkGithub from 'remark-github';
import remarkAbbr from 'remark-abbr';
import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import('dotenv').then(({config}) => config());
// mdsvex config
const mdsvexConfig = {
extensions: ['.svelte.md', '.md', '.svx'],
layout: {
_: './src/mdsvexlayout.svelte' // default mdsvex layout
},
smartypants: {
dashes: 'oldschool'
},
remarkPlugins: [
[
remarkGithub,
{
// Use your own repository
repository: process.env.GH_REPO_URL || 'https://github.com/sw-yx/swyxkit.git'
}
],
remarkAbbr
],
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
behavior: 'wrap'
}
]
]
};
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.html', ...mdsvexConfig.extensions],
preprocess: [
mdsvex(mdsvexConfig),
preprocess({
postcss: true,
scss: true,
typescript: true,
})
],
kit: {
adapter: adapter(),
}
};
export default config;