-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathastro.config.js
52 lines (50 loc) · 1.15 KB
/
astro.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
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import {defineConfig} from 'astro/config';
import tailwind from '@astrojs/tailwind';
import sitemap from '@astrojs/sitemap';
import remarkCustomHeaderId from 'remark-custom-header-id';
/// import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import {SITE} from './source/config.mjs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
// https://astro.build/config
export default defineConfig({
site: SITE.origin,
srcDir: './source',
output: 'static',
trailingSlash: 'never',
build: {
format: 'file',
},
redirects: {
'/thanks': '/supporters',
'/lock-screen-one': '/any-text',
},
integrations: [
tailwind({
applyBaseStyles: false,
}),
sitemap(),
],
markdown: {
remarkPlugins: [
remarkCustomHeaderId,
],
// TODO
// rehypePlugins: [
// rehypeHeadingIds,
// [rehypeAutolinkHeadings, {behavior: 'wrap'}],
// ]
},
vite: {
resolve: {
alias: {
'~': path.resolve(__dirname, './source'),
},
},
},
legacy: {
// TODO: https://docs.astro.build/en/guides/upgrade-to/v5/#enabling-the-legacycollections-flag
collections: true,
},
});