-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathdocusaurus.config.js
226 lines (216 loc) · 6.39 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
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
224
225
226
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import { themes as prismThemes } from 'prism-react-renderer'
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Chaos Mesh',
tagline: 'A Powerful Chaos Engineering Platform for Kubernetes',
favicon: '/img/favicon.ico',
// Set the production url of your site here
url: 'https://chaos-mesh.org',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'chaos-mesh', // Usually your GitHub org/user name.
projectName: 'chaos-mesh.github.io', // Usually your repo name.
onBrokenLinks: 'warn',
trailingSlash: true,
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh'],
localeConfigs: {
en: {
label: 'English',
},
zh: {
label: '简体中文',
},
},
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
gtag: {
trackingID: 'G-T31S4LR9LL',
},
docs: {
sidebarPath: './sidebars.js',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/chaos-mesh/website/edit/master/',
editLocalizedFiles: true,
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/chaos-mesh/website/edit/master/',
editLocalizedFiles: true,
},
theme: {
customCss: './src/styles/custom.css',
},
}),
],
],
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
themeConfig: {
colorMode: {
respectPrefersColorScheme: true,
},
image: '/img/chaos-mesh-social-preview.png',
algolia: {
appId: '3BY0S3HQX6',
apiKey: '99bb3af44d57f0e8f6d7e019d7e2c2d7',
indexName: 'chaos-mesh',
},
navbar: {
hideOnScroll: true,
title: 'Chaos Mesh',
logo: {
alt: 'Chaos Mesh',
src: 'img/logos/logo-mini.svg',
srcDark: 'img/logos/logo-mini-white.svg',
},
items: [
{ to: 'docs', label: 'Documentation' },
{
to: 'blog',
label: 'Blog',
},
{
href: 'https://community.cncf.io/chaos-mesh-community/',
label: 'Community Group',
},
{
type: 'docsVersionDropdown',
dropdownItemsAfter: [
{
type: 'html',
value: '<hr style="margin: .5em 0;" />',
},
{ to: '/versions', label: 'All Versions' },
{ to: '/supported-releases', label: 'Supported Releases' },
],
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://github.com/chaos-mesh/chaos-mesh',
className: 'header-github-link',
'aria-label': 'GitHub',
position: 'right',
},
],
},
footer: {
links: [
{
title: 'Documentation',
items: [
{
label: 'Quick Start',
to: 'docs/quick-start',
},
{
label: 'Run a Chaos Experiment',
to: 'docs/run-a-chaos-experiment',
},
{
label: 'Developer Guide Overview',
to: 'docs/developer-guide-overview',
},
{
label: 'FAQs',
to: 'docs/faqs',
},
],
},
{
title: 'Community',
items: [
{
label: 'Blog',
to: 'blog',
},
{
label: 'CNCF Community Group',
href: 'https://community.cncf.io/chaos-mesh-community/',
},
{
label: 'GitHub',
href: 'https://github.com/chaos-mesh/chaos-mesh',
},
{
label: 'Slack (#project-chaos-mesh)',
href: 'https://slack.cncf.io/',
},
{
label: 'Twitter',
href: 'https://twitter.com/chaos_mesh',
},
],
},
{
title: 'Acknowledgements',
items: [
{
label: 'Thanks for the technology illustrations by Storyset',
href: 'https://storyset.com/technology',
},
{
html: `
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" />
</a>
`,
},
{
html: `
<img
referrerpolicy="no-referrer-when-downgrade"
src="https://static.scarf.sh/a.png?x-pxid=3103bfa4-2073-4b9a-bdac-f36f63d979a4"
/>
`,
},
],
},
],
copyright: `
<p style="font-weight: 500;">Copyright © Chaos Mesh Authors ${new Date().getFullYear()} | Documentation Distributed under CC-BY-4.0</p>
© ${new Date().getFullYear()} The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage/"> Trademark Usage</a> page.
`,
},
prism: {
theme: prismThemes.github,
darkTheme: {
plain: prismThemes.vsDark.plain,
styles: [
...prismThemes.vsDark.styles,
{
types: ['function', 'keyword'],
style: {
color: '#f25c7c',
},
},
],
},
additionalLanguages: ['bash'],
},
},
plugins: [
'./docusaurus-tailwind-v3',
['@gracefullight/docusaurus-plugin-microsoft-clarity', { projectId: 'lggqck9srz' }],
],
}
export default config