-
Notifications
You must be signed in to change notification settings - Fork 3
/
docusaurus.config.js
71 lines (64 loc) · 1.82 KB
/
docusaurus.config.js
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
// @ts-check
const config = {
title: '洛谷开放平台文档',
favicon: 'img/favicon.ico',
url: 'https://docs.lgapi.cn/',
baseUrl: '/open/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans'],
},
presets: [
['@docusaurus/preset-classic', {
blog: false,
pages: false,
docs: {
routeBasePath: '/'
}
}],
['redocusaurus', {
specs: [
{ id: 'open', spec: './openapi/_api.yaml', route: '/openapi' }
]
}]
],
themeConfig: {
navbar: {
title: '洛谷开放平台',
logo: {
alt: 'Luogu',
src: 'img/logo.png'
},
items: [{
position: 'left',
// type: 'doc',
to: '/',
activeBaseRegex: '^/open/?$',
label: '介绍'
}, {
position: 'left',
to: '/judge/',
activeBaseRegex: '^/open/judge/',
label: '评测能力'
}, {
position: 'right',
to: '/openapi',
label: 'OpenAPI'
}],
},
footer: {
style: 'dark',
copyright: `
Copyright © ${new Date().getFullYear()} 上海洛谷网络科技有限公司. Built with Docusaurus.<br />
<small><a href="http://beian.miit.gov.cn" target="_blank">沪ICP备18008322号</a></small>
`
},
prism: {
theme: require('prism-react-renderer/themes/github'),
darkTheme: require('prism-react-renderer/themes/dracula')
}
},
};
module.exports = config;