-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
85 lines (82 loc) · 2.06 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
75
76
77
78
79
80
81
82
83
84
85
import {defineConfig} from 'astro/config';
import starlight from '@astrojs/starlight';
import partytown from '@astrojs/partytown';
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import swup from '@swup/astro';
const IS_PROD = process.env.NODE_ENV === 'production';
// https://astro.build/config
export default defineConfig({
site: 'https://stevie.top',
prefetch: true,
integrations: [
swup(),
// https://starlight.astro.build/
starlight({
title: 'Stevie Home',
description: '个人主页',
// logo: {
// light: './src/assets/light-logo.svg',
// dark: './src/assets/dark-logo.svg',
// src: 'https://avatars.githubusercontent.com/u/8325201?v=4',
// replacesTitle: true,
// },
head: [
{
tag: 'script',
attrs: {
src: '/services.js',
type: IS_PROD ? 'module' : 'text',
defer: true
}
}
],
customCss: [
// Relative path to your custom CSS file
'./src/tailwind.css',
],
locales: {
root: {
label: '简体中文',
lang: 'zh-CN'
}
},
social: {
github: 'https://github.com/stevieyu'
},
sidebar: [{
label: '便笺',
autogenerate: {
directory: 'notes'
}
}, {
label: '工具',
autogenerate: {
directory: 'tools'
}
}, {
label: '例子',
autogenerate: {
directory: 'examples'
}
}],
lastUpdated: true,
editLink: {
baseUrl: 'https://github.com/stevieyu/stevieyu.github.io/edit/master'
}
}),
// https://docs.astro.build/en/guides/integrations-guide/partytown/
// partytown(),
tailwind({
applyBaseStyles: false,
}),
// https://docs.astro.build/en/guides/integrations-guide/sitemap/
// sitemap(),
],
// https://docs.astro.build/en/guides/assets/#using-sharp
image: {
service: {
entrypoint: 'astro/assets/services/sharp'
}
},
});