-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathastro.config.mjs
70 lines (68 loc) · 1.86 KB
/
astro.config.mjs
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
63
64
65
66
67
68
69
70
// @ts-check
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
import liveCode from 'astro-live-code'
import svelte from '@astrojs/svelte'
// https://astro.build/config
export default defineConfig({
srcDir: 'docs',
outDir: 'dist-docs',
vite: {
resolve: {
alias: {
'svelte-modals/legacy': '/src/lib/legacy.svelte.ts',
'svelte-modals': '/src/lib/index.ts',
$lib: '/docs/lib'
},
dedupe: ['svelte-modals']
}
},
integrations: [
starlight({
title: 'Svelte Modals',
social: {
github: 'https://github.com/mattjennings/svelte-modals'
},
sidebar: [
{
label: 'Overview',
items: [
{ label: 'Getting Started', slug: 'overview/getting-started' },
{ label: 'How it works', slug: 'overview/how-it-works' }
]
},
{
label: 'Modal Components',
items: [
{ label: 'Props', slug: 'modal-components/props' },
{ label: 'Transitions', slug: 'modal-components/transitions' },
{ label: 'Snippets', slug: 'modal-components/snippets' },
{ label: 'Lazy loading', slug: 'modal-components/lazy-loading' },
{ label: 'Preventing close', slug: 'modal-components/preventing-close' }
]
},
{
label: 'API',
items: [
{ label: 'modals', slug: 'api/modals' },
{ label: '<Modals />', slug: 'api/modals-component' }
]
},
{
label: 'Migrations',
items: [{ label: 'v2', slug: 'migrations/v2' }]
}
],
customCss: ['./docs/styles.css']
}),
svelte({
preprocess: []
}),
liveCode({
layout: '/docs/lib/layouts/code/Code.astro',
defaultProps: {
'client:load': true
}
})
]
})