-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
74 lines (73 loc) · 1.53 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
71
72
73
74
import { defineConfig } from 'astro/config'
import mdx from '@astrojs/mdx'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import { remarkReadingTime } from './src/utils/readTime.ts'
import compress from 'astro-compress'
export default defineConfig({
site: 'https://dotnetevangelist.com',
trailingSlash: 'never',
build: {
inlineStylesheets: 'auto', // Automatically inline small stylesheets
assets: 'assets', // Optimize asset handling
splitting: true, // Enable code splitting
redirects: true, // Generate 301 redirects for changed URLs
},
vite: {
build: {
cssCodeSplit: true,
rollupOptions: {
output: {
manualChunks: {
'motion': ['motion'],
'mdx': ['@astrojs/mdx'],
}
}
}
},
ssr: {
noExternal: ['motion']
}
},
markdown: {
remarkPlugins: [remarkReadingTime],
drafts: true,
shikiConfig: {
theme: 'material-theme-palenight',
wrap: true,
transformers: [] // Disable unnecessary transformers
}
},
integrations: [
mdx({
syntaxHighlight: 'shiki',
shikiConfig: {
experimentalThemes: {
light: 'vitesse-light',
dark: 'material-theme-palenight',
},
wrap: true
},
drafts: true
}),
sitemap({
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date()
}),
tailwind({
applyBaseStyles: false // We'll handle base styles in our CSS
}),
compress({
CSS: true,
HTML: {
removeAttributeQuotes: false
},
Image: false,
JavaScript: true,
SVG: true,
Logger: 1
})
],
outDir: './dist'
})