-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mts
41 lines (39 loc) · 1.05 KB
/
astro.config.mts
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
import db from '@astrojs/db';
import node from '@astrojs/node';
import runtimeLogger from '@inox-tools/runtime-logger';
import astrolace from '@matthiesenxyz/astrolace';
import robotsTXT from 'astro-robots';
import { defineConfig, envField } from 'astro/config';
import UnoCSS from 'unocss/astro';
import { SITE_URL } from './consts';
const siteUrl = process.env.NODE_ENV === 'production' ? SITE_URL : 'http://localhost:4321';
// https://astro.build/config
export default defineConfig({
site: siteUrl,
output: 'server',
adapter: node({
mode: 'standalone',
}),
integrations: [
db(),
astrolace(),
UnoCSS({ injectReset: true }),
robotsTXT({
host: siteUrl.replace(/^https?:\/\/|:\d+/g, ''),
sitemap: false,
policy: [
{ userAgent: '*', allow: ['/'] },
{ userAgent: '*', disallow: ['/api/'] },
],
}),
runtimeLogger(),
],
experimental: {
env: {
schema: {
OPENAI_API_KEY: envField.string({ context: 'server', access: 'secret' }),
GITHUB_API_KEY: envField.string({ context: 'server', access: 'secret' }),
},
},
},
});