-
Notifications
You must be signed in to change notification settings - Fork 12
/
astro.config.mjs
223 lines (218 loc) · 5.65 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import { defineConfig } from 'astro/config';
import starlightLinksValidator from 'starlight-links-validator'
import starlight from '@astrojs/starlight';
import compress from "astro-compress";
import rehypeExternalLinks from 'rehype-external-links';
import { remarkHeadingId } from 'remark-custom-heading-id';
import { generatePages } from './generate'
generatePages()
// https://astro.build/config
export default defineConfig({
site: 'https://rec.danmuji.org',
outDir: './site', // for compatibility with mkdocs
markdown: {
remarkPlugins: [
remarkHeadingId,
],
rehypePlugins: [
[
rehypeExternalLinks,
{
content: { type: 'text', value: '' },
contentProperties: { className: ['external-link-badge'] },
rel: ['noreferrer'],
target: '_blank',
}
],
]
},
integrations: [
starlightLinksValidator(),
starlight({
title: '录播姬',
description: '一个简单好用免费开源的直播录制工具',
logo: {
src: './public/favicon.svg',
},
customCss: [
'./src/styles/custom.css',
],
editLink: {
baseUrl: 'https://github.com/BililiveRecorder/website/blob/main/'
},
defaultLocale: 'zh-CN',
locales: {
root: {
label: '简体中文',
lang: 'zh-CN'
}
},
components: {
SocialIcons: './src/components/SocialIcons.astro'
},
sidebar: [
{
label: '安装使用',
items: [
{
label: '录播姬的各个版本',
link: '/install/versions/'
},
{
label: '录播姬桌面版',
link: '/install/desktop/'
},
{
label: '录播姬命令行版',
link: '/install/cli/'
},
{
label: '录播姬容器镜像',
link: '/install/container/'
},
{
label: '详细教程',
collapsed: true,
items: [
{
label: '使用 systemd 运行命令行版',
link: '/install/guides/systemd/'
},
{
label: '使用 pm2 运行命令行版',
link: '/install/guides/pm2/'
},
{
label: '使用 Portainer 运行容器',
link: '/install/guides/portainer/'
},
{
label: '使用 Synology 运行容器',
link: '/install/guides/synology/'
},
],
},
],
},
{
label: '软件功能',
items: [
{
label: '常见问题',
link: '/user/faq/'
},
{
label: '录制模式',
link: '/user/modes/'
},
{
label: '弹幕录制',
link: '/user/danmaku/'
},
{
label: '录播修复',
link: '/user/repair/'
},
{
label: '工具箱',
items: [
{
label: '分析和修复',
link: '/user/toolbox/analyze-repair/'
},
{
label: '弹幕文件合并',
link: '/user/toolbox/merge-danmaku/'
},
],
},
{
label: '更新日志',
link: '/user/changelog/'
},
{
label: '其他工具和项目',
link: '/user/other-projects/'
},
],
},
{
label: '参考',
items: [
{
label: '软件设置',
link: '/reference/settings/'
},
{
label: '命令行参数',
link: '/reference/arguments/'
},
{
label: '文件名模板',
link: '/reference/filename-template/'
},
{
label: 'Webhook',
link: '/reference/webhook/'
},
{
label: '用户脚本',
link: '/reference/userscript/'
},
{
label: '日志文件',
link: '/reference/logs/'
},
{
label: 'HTTP API',
autogenerate: {
directory: '/reference/api/',
}
},
],
},
{
label: '开发',
collapsed: true,
items: [
{
label: '录播姬 3.0 测试说明',
link: '/dev/v3/'
},
{
label: '生放送 CDN 信息',
link: '/dev/cdn-info/'
},
{
label: '直播数据修复系统',
link: '/dev/repair/'
},
{
label: '添加新设置项',
link: '/dev/new-setting/'
},
{
label: '新版本发布流程',
link: '/dev/new-release/'
},
{
label: 'sdk.js',
collapsed: true,
autogenerate: {
directory: 'dev/sdk.js/',
}
},
{
label: '社区 SDK',
link: '/dev/sdk/'
},
],
},
],
}),
compress(),
],
experimental: {
devOverlay: false
},
});