-
Notifications
You must be signed in to change notification settings - Fork 62
/
astro.config.mjs
57 lines (56 loc) · 1.84 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
import { defineConfig } from 'astro/config'
import mdx from '@astrojs/mdx'
import tailwind from '@astrojs/tailwind'
import react from '@astrojs/react'
import sitemap from '@astrojs/sitemap'
import partytown from '@astrojs/partytown'
import { SITE } from './src/config.ts'
import { remarkReadingTime } from './src/support/plugins.ts'
import { uploadAssetsToS3 } from './src/support/uploader.ts'
export default defineConfig({
site: SITE.url,
image: {
// If you don't want to optimize images during the BUILD process,
// you can open this comment. It will significantly reduce the build time but won't optimize any images anymore.
// service: passthroughImageService(),
},
integrations: [
partytown(),
mdx(),
sitemap(),
tailwind(),
react(),
(await import('@playform/compress')).default({
CSS: true,
HTML: true,
Image: false,
JavaScript: true,
SVG: true,
Logger: 2,
}),
uploadAssetsToS3(),
],
markdown: {
remarkPlugins: [remarkReadingTime],
shikiConfig: {
theme: 'github-light',
themes: {
light: 'github-light',
dark: 'github-dark',
},
wrap: false,
},
},
devToolbar: {
enabled: false,
},
prefetch: true,
output: 'static',
build: {
// Specifies the directory in the build output where Astro-generated assets (bundled JS and CSS for example) should live.
// see https://docs.astro.build/en/reference/configuration-reference/#buildassets
assets: 'assets',
// see https://docs.astro.build/en/reference/configuration-reference/#buildassetsprefix
assetsPrefix: process.env.S3_ENABLE ? 'https://images.godruoyi.com/gblog' : '',
},
})