forked from flucoma/learn-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
59 lines (57 loc) · 1.44 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
58
59
import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';
import headings from 'rehype-autolink-headings';
import { s } from 'hastscript';
import { mdsvex } from 'mdsvex';
import slug from 'rehype-slug';
// import jargon from 'rehype-jargon';
// import definitions from './jargon.mjs';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.svx'],
preprocess: [
preprocess(),
mdsvex({
rehypePlugins: [
// [ jargon, { jargon: definitions.definitions } ],
slug,
[
headings,
{
behavior: 'append',
properties: {
target: '_self'
},
test: ['h2', 'h3', 'h4', 'h5', 'h6'], // don't auto-link <h1>
content: s(
'svg .autolink',
{
xmlns: 'http://www.w3.org/2000/svg',
height: '16px',
viewbox: '0 0 24 24',
fill: '#000000'
},
[
s('path', {
d: 'M0 0h24v24H0z',
fill: 'none'
}),
s('path', {
d: 'M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'
})
]
)
}
]
],
layout: {
_: './src/lib/layouts/Content.svelte',
contentindex: './src/lib/layouts/ContentIndex.svelte'
}
})
],
kit: {
adapter: adapter()
}
};
export default config;