-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.ts
More file actions
44 lines (41 loc) · 1.11 KB
/
Copy pathastro.config.ts
File metadata and controls
44 lines (41 loc) · 1.11 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
import { unified } from '@astrojs/markdown-remark'
import mdx from '@astrojs/mdx'
import preact from '@astrojs/preact'
import sitemap from '@astrojs/sitemap'
import tailwindcss from '@tailwindcss/vite'
import icon from 'astro-icon'
import { defineConfig } from 'astro/config'
import sectionize from 'remark-sectionize'
import { loadEnv } from 'vite'
import { envConfig } from './env.config.ts'
import { remarkReadingTime } from './plugins/remark-reading-time'
const { SITE_URL, ENV_NAME } = loadEnv('', process.cwd(), '')
// https://astro.build/config
export default defineConfig({
env: envConfig,
site: SITE_URL ?? 'http://localhost:4321',
vite: {
plugins: [tailwindcss()],
},
integrations: [
preact(),
mdx(),
icon(),
(ENV_NAME ?? 'staging') === 'production' && sitemap({ lastmod: new Date() }),
],
trailingSlash: 'never',
markdown: {
syntaxHighlight: {
type: 'shiki',
},
shikiConfig: {
themes: {
light: 'catppuccin-latte',
dark: 'catppuccin-mocha',
},
},
processor: unified({
remarkPlugins: [sectionize, remarkReadingTime],
}),
},
})