-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathastro.config.ts
More file actions
65 lines (62 loc) · 1.47 KB
/
astro.config.ts
File metadata and controls
65 lines (62 loc) · 1.47 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import mdx from '@astrojs/mdx';
import node from '@astrojs/node';
import sitemap from '@astrojs/sitemap';
import { defineConfig } from 'astro/config';
import expressiveCode from 'astro-expressive-code';
import { loadEnv } from 'vite';
import spectre, { type GiscusMapping } from './package/src';
import { spectreDark } from './src/ec-theme';
const {
GISCUS_REPO,
GISCUS_REPO_ID,
GISCUS_CATEGORY,
GISCUS_CATEGORY_ID,
GISCUS_MAPPING,
GISCUS_STRICT,
GISCUS_REACTIONS_ENABLED,
GISCUS_EMIT_METADATA,
GISCUS_LANG,
} = loadEnv(process.env.NODE_ENV!, process.cwd(), '');
// https://astro.build/config
const config = defineConfig({
site: 'https://spectre.lou.gg',
output: 'static',
integrations: [
expressiveCode({
themes: [spectreDark],
}),
mdx(),
sitemap(),
spectre({
name: 'Spectre',
openGraph: {
home: {
title: 'Spectre',
description: 'A minimalistic theme for Astro.',
},
blog: {
title: 'Blog',
description: 'News and guides for Spectre.',
},
projects: {
title: 'Projects',
},
},
giscus: {
repository: GISCUS_REPO,
repositoryId: GISCUS_REPO_ID,
category: GISCUS_CATEGORY,
categoryId: GISCUS_CATEGORY_ID,
mapping: GISCUS_MAPPING as GiscusMapping,
strict: GISCUS_STRICT === 'true',
reactionsEnabled: GISCUS_REACTIONS_ENABLED === 'true',
emitMetadata: GISCUS_EMIT_METADATA === 'true',
lang: GISCUS_LANG,
},
}),
],
adapter: node({
mode: 'standalone',
}),
});
export default config;