-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
255 lines (240 loc) · 6.64 KB
/
docusaurus.config.ts
File metadata and controls
255 lines (240 loc) · 6.64 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
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const isDev = process.env.NODE_ENV === 'development';
const baseUrl = '/';
const config: Config = {
title: 'Yellow Network',
tagline: 'Decentralized clearing and settlement network.\nDevelop Yellow Apps with instant finality.',
favicon: 'img/favicon.svg',
customFields: {
packageVersion: require('./package.json').version,
},
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: true, // Improve compatibility with the upcoming Docusaurus v4
},
// Set the production url of your site here
url: isDev ? 'http://localhost:3000' : 'https://docs.yellow.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: 'layer-3', // Usually your GitHub org/user name.
projectName: 'docs', // Usually your repo name.
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
// SEO metadata - injected into HTML head
headTags: [
{
tagName: 'meta',
attributes: {
name: 'description',
content: 'Build Yellow Apps with the Yellow SDK - a real-time communication toolkit for decentralized clearing and settlement. Create applications with unified cross-chain balance and instant finality.',
},
},
],
// Even if you don't use internationalization, 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: 'en',
locales: ['en'],
},
presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
routeBasePath: '/docs',
editUrl:
'https://github.com/layer-3/docs/tree/master/',
sidebarCollapsed: false,
sidebarCollapsible: false,
breadcrumbs: true,
includeCurrentVersion: true,
versions: {
current: {
label: '1.x',
path: '',
banner: 'none',
},
'0.5.x': {
label: '0.5.x',
path: '0.5.x',
banner: 'none',
},
},
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
plugins: [
[
'docusaurus-lunr-search',
{
languages: ['en'],
},
],
],
themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
title: '',
logo: {
alt: 'Yellow Network',
src: 'img/themes/light/logo.svg',
srcDark: 'img/themes/dark/logo.svg',
},
items: [
{
type: 'doc',
docId: 'learn/index',
label: 'Learn',
position: 'left',
},
{
type: 'doc',
docId: 'build/quick-start/index',
label: 'Build',
position: 'left',
},
{
type: 'doc',
docId: 'protocol/introduction',
label: 'Protocol',
position: 'left',
},
{
type: 'doc',
docId: 'guides/index',
label: 'Guides',
position: 'left',
},
{
to: '/whitepaper',
label: 'Whitepaper',
position: 'left',
},
{
href: 'https://github.com/layer-3',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
},
{
type: 'docsVersionDropdown',
position: 'right',
className: 'navbar-version-dropdown',
},
],
},
footer: {
style: 'light',
links: [
{
title: ' ',
items: [
{
html: `
<img src="/img/themes/light/logo.svg" alt="Yellow Network" style="width: 80px; margin-bottom: 20px; margin-left: 0;" class="footer-logo-light" />
<img src="/img/themes/dark/logo.svg" alt="Yellow Network" style="width: 80px; margin-bottom: 20px; margin-left: 0; display: none;" class="footer-logo-dark" />
`,
},
],
},
{
title: 'Docs',
items: [
{
label: 'Learn',
to: '/docs/learn',
},
{
label: 'Build',
to: '/docs/build/quick-start',
},
{
label: 'Guides',
to: '/docs/guides',
},
{
label: 'Whitepaper',
to: '/whitepaper',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.com/invite/yellownetwork',
},
{
label: 'GitHub',
href: 'https://github.com/layer-3',
},
],
},
{
title: 'Social',
items: [
{
label: 'X',
href: 'https://x.com/YellowCom_News',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Layer3 Fintech Ltd.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'diff', 'json', 'go', 'typescript'],
defaultLanguage: 'javascript',
magicComments: [
{
className: 'git-diff-remove',
line: 'remove-next-line',
block: { start: 'remove-start', end: 'remove-end' },
},
{
className: 'git-diff-add',
line: 'add-next-line',
block: { start: 'add-start', end: 'add-end' },
},
{
className: 'theme-code-block-highlighted-line',
line: 'highlight-next-line',
block: { start: 'highlight-start', end: 'highlight-end' },
},
],
},
mermaid: {
theme: {
light: 'default',
dark: 'default',
},
},
} satisfies Preset.ThemeConfig,
};
export default config;