-
Notifications
You must be signed in to change notification settings - Fork 20
/
svelte.config.js
46 lines (41 loc) · 1.07 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
import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';
import { mdsvex } from 'mdsvex';
import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeExternalLinks from 'rehype-external-links';
import addClasses from 'rehype-add-classes';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.md'],
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
preprocess({
preserve: ['ld+json'],
postcss: true
}),
mdsvex({
extensions: ['.md'],
highlight: {
alias: { vue: 'html' }
},
rehypePlugins: [
rehypeSlug,
rehypeAutolinkHeadings,
[rehypeExternalLinks, { target: '_blank' }],
[addClasses, { 'h1,h2,h3,h4,h5,h6': 'group' }]
],
layout: 'src/routes/__layout-md.svelte'
})
],
kit: {
adapter: adapter({ fallback: '404.html' }),
prerender: {
default: true
},
trailingSlash: 'always',
inlineStyleThreshold: 1024 * 32
}
};
export default config;