-
Notifications
You must be signed in to change notification settings - Fork 21
/
astro.config.ts
79 lines (77 loc) · 1.72 KB
/
astro.config.ts
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
import { defineConfig, squooshImageService } from 'astro/config';
import starlight from '@astrojs/starlight';
import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeExternalLinks from 'rehype-external-links';
// https://astro.build/config
export default defineConfig({
site: 'https://app.evecalm.com',
base: '/frontend-guideline/',
markdown: {
rehypePlugins: [
rehypeSlug,
[rehypeAutolinkHeadings, { behavior: 'prepend' }],
[rehypeExternalLinks, {
target: '_blank', rel: ['noopener', 'nofollow'],
}]
],
},
image: {
service: squooshImageService(),
},
integrations: [
starlight({
title: '前端开发学习指引',
social: {
github: 'https://github.com/oe/frontend-guideline',
twitter: 'https://twitter.com/forth_ink',
},
editLink: {
baseUrl: 'https://github.com/oe/frontend-guideline/edit/main/'
},
customCss: [
'./src/assets/style.scss'
],
head: [
{
tag: 'script',
attrs: {
src: '/frontend-guideline/post-a11y.js',
defer: true
}
}
],
components: {
// Component that overrides a built-in component:
SocialIcons: './src/components/SocialIcons.astro',
},
credits: true,
sidebar: [
{
label: '首页',
link: '/'
},
{
label: '准备工作',
autogenerate: { directory: 'basic' },
},
{
label: '学习',
autogenerate: { directory: 'learning' },
},
{
label: '开发',
autogenerate: { directory: 'dev' },
},
{
label: '自动化相关',
autogenerate: { directory: 'cicd' },
},
{
label: '其他',
autogenerate: { directory: 'misc' },
},
],
}),
],
});