-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvelte.config.js
More file actions
62 lines (56 loc) · 1.31 KB
/
Copy pathsvelte.config.js
File metadata and controls
62 lines (56 loc) · 1.31 KB
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
60
61
62
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import * as toml from '@std/toml';
import { resolve } from 'node:path';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.md', '.svx'],
preprocess: [
vitePreprocess(),
mdsvex({
extensions: ['.md', '.svx'],
frontmatter: {
type: 'toml',
marker: '+',
parse(frontmatter, messages) {
try {
return toml.parse(frontmatter);
} catch (e) {
messages.push(
'Parsing error on line ' + e.line + ', column ' + e.column + ': ' + e.message
);
}
}
},
smartypants: {
dashes: 'oldschool',
quotes: true,
ellipses: true,
backticks: false
},
layout: {
about: resolve('src/routes/(site)/about/_layout.svelte'),
blogpost: resolve('src/routes/(site)/entries/_layout.svelte'),
simple: resolve('src/components/_window_layout.svelte')
}
})
],
kit: {
csrf: {
checkOrigin: false,
trustedOrigins: ["https://gaze.systems", "https://ptr.pet", "https://poor.dog"]
},
prerender: {
handleHttpError: 'warn'
},
adapter: adapter({
precompress: true
}),
alias: {
$components: 'src/components',
$styles: 'src/styles'
}
}
};
export default config;