forked from wiwi0ink/primihub-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
172 lines (162 loc) · 4.69 KB
/
docusaurus.config.js
File metadata and controls
172 lines (162 loc) · 4.69 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
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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const math = require('remark-math');
const katex = require('rehype-katex');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'PrimiHub',
// tagline: 'PrimiHub are cool',
url: 'https://docs.primihub.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'primihub', // Usually your GitHub org/user name.
projectName: 'primihub-docs', // Usually your repo name.
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'zh-cn',
locales: ['zh-cn', 'en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: ({locale,version,docPath}) =>
`https://github.com/primihub/primihub-docs/edit/main/i18n/${locale}/docusaurus-plugin-content-docs/${version}/${docPath}`,
editLocalizedFiles: true,
showLastUpdateTime: true,
remarkPlugins: [math],
rehypePlugins: [katex],
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
googleAnalytics: {
trackingID: 'G-KLS723TJR0',
anonymizeIP: true,
},
gtag: {
trackingID: 'G-KLS723TJR0',
anonymizeIP: true,
}
}),
],
],
stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css',
type: 'text/css',
integrity:
'sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X',
crossorigin: 'anonymous',
},
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: '首页',
logo: {
alt: 'PrimiHub Logo',
src: 'img/logo.png',
srcDark: 'img/logo-dark.png'
},
items: [
{
type: 'doc',
docId: 'quick-start',
position: 'left',
label: '文档',
},
{
type: 'doc',
docId: 'quick-start-platform/online-service',
position: 'right',
label: '快速体验',
},
{
href: 'https://github.com/primihub/primihub',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: '支持与服务',
items: [
{
label: '快速开始',
to: '/docs/quick-start',
},
{
label: '安装使用',
to: '/docs/advance-usage/start-nodes',
},
{
label: '常见问题',
to: '/docs/faq',
},
],
},
{
title: '资源与社区',
items: [
{
label: '成为贡献者',
href: 'https://github.com/primihub/community',
},
],
},
{
title: '更多',
items: [
{
label: 'GitHub',
href: 'https://github.com/primihub/primihub',
},
{
label: 'Twitter',
href: 'https://twitter.com/OpenPrimi',
},
{
label: 'YouTube',
href: 'https://www.youtube.com/channel/UCmbSodM232zm_Jod-z4Bv4A/featured',
},
{
label: '关于PrimiHub',
href: 'https://primihub.com/',
},
{
html: `
<img src="/img/primihub.png" alt="primihub qrcode" width="80" height="80" style="margin-right: 10px;"/>
`,
},
],
},
],
copyright: `<p>Copyright © ${new Date().getFullYear()} PrimiHub Project, Inc. Built with Docusaurus.</p><p>111</p>`,
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
}),
};
module.exports = config;