-
Notifications
You must be signed in to change notification settings - Fork 31
/
docusaurus.config.js
398 lines (383 loc) · 10.7 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
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
import {themes as prismThemes} from 'prism-react-renderer';
// const UIKitReferencePlugins = require('./plugins/ui-kit-reference-plugin.cjs');
const { webpackPlugin } = require('./plugins/webpack-plugin.cjs');
const posthogPlugin = require('./plugins/posthog-plugin.cjs');
/** @type {import('@docusaurus/preset-classic').Options} */
const defaultSettings = {
remarkPlugins: [
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
],
};
/**
* Defines a section with overridable defaults
* @param {string} section
* @param {import('@docusaurus/plugin-content-docs').Options} options
*/
function defineSection(section, options = {}) {
return [
'@docusaurus/plugin-content-docs',
/** @type {import('@docusaurus/plugin-content-docs').Options} */
({
path: `docs/${section}`,
routeBasePath: section,
id: section,
sidebarPath: require.resolve('./sidebars-default.js'),
breadcrumbs: false,
//editUrl: 'https://github.com/sentinel-official/docs/tree/main/',
...defaultSettings,
...options,
}),
];
}
const SECTIONS = [
defineSection('apis'),
defineSection('dvpn-coin'),
defineSection('full-node-setup'),
defineSection('getting-started'),
defineSection('networks'),
defineSection('nodes'),
defineSection('node-monitoring'),
defineSection('node-setup'),
defineSection('sdk'),
defineSection('sentinel-cli'),
defineSection('sentinel-hub'),
defineSection('validator-setup'),
];
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Sentinel Docs',
tagline: 'Build on the leading decentralized VPN. 🚀',
// TODO: Update base url
url: 'https://docs.sentinel.co',
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: '/logo/sentinel.svg',
trailingSlash: false,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'sentinel-official', // Usually your GitHub org/user name.
projectName: '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: 'en',
locales: ['en'],
},
clientModules: [require.resolve('./src/client/define-ui-kit.js')],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs/home',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars-home.js'),
breadcrumbs: false,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
//editUrl: 'https://github.com/sentinel-official/docs/tree/main/',
...defaultSettings,
},
blog: false,
theme: {
customCss: [
require.resolve('./src/css/custom.css'),
require.resolve('./src/css/api-reference.css'),
],
},
}),
],
],
plugins: [
...SECTIONS,
// ...UIKitReferencePlugins,
webpackPlugin,
posthogPlugin,
],
themes: ['@docusaurus/theme-live-codeblock'],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: '/img/sentinel-docs-card.png',
colorMode: {
defaultMode: 'dark',
},
docs: {
sidebar: {
hideable: true,
},
},
navbar: {
// NOTE: hideOnScroll breaks on `/api`, enable when fixed
// hideOnScroll: true,
//title: 'SENTINEL DOCS',
logo: {
href: '/',
src: '/logo/sentinel-logo-light.svg',
srcDark: '/logo/sentinel-logo-dark.svg',
alt: 'Sentinel Docs',
//height: '26px',
//width: '114px',
},
items: [
{
label: 'Get Started',
to: 'getting-started/introduction',
position: 'left',
},
{
label: 'DVPN Coin',
to: 'dvpn-coin',
position: 'left',
},
{
label: 'Sentinel Core',
type: 'dropdown',
position: 'left',
items: [
{
to: 'sentinel-hub',
label: 'Sentinel HUB',
},
{
to: 'sentinel-cli',
label: 'Sentinel CLI',
},
{
to: 'sdk',
label: 'SDKs',
},
{
to: 'networks',
label: 'Networks',
},
],
// className: 'new-badge',
//activeBaseRegex: '(.*ui-kit|.*web-core)',
},
{
label: 'dVPN Nodes',
to: 'nodes',
position: 'left',
},
{
label: 'User Guides',
type: 'dropdown',
position: 'left',
items: [
{
to: 'node-setup',
label: 'dVPN Node Setup',
},
{
to: 'full-node-setup',
label: 'Full Node Setup',
},
{
to: 'validator-setup',
label: 'Validator Setup',
},
{
to: 'node-monitoring',
label: 'Node Monitoring',
},
],
// className: 'new-badge',
},
{
label: 'API Reference',
to: 'apis',
position: 'left',
},
{
label: 'Find us',
type: 'dropdown',
position: 'right',
items: [
{
href: 'https://x.com/sentineldvpn',
label: 'X/Twitter',
},
{
href: 'https://t.me/sentineldvpn',
label: 'Telegram',
},
{
href: 'https://discord.com/invite/mmAA8qF',
label: 'Discord',
},
{
href: 'https://www.reddit.com/r/dVPN/',
label: 'Reddit',
},
{
href: 'https://commonwealth.im/sentinel/',
label: 'Commonwealth',
},
{
href: 'https://medium.com/@sentinel',
label: 'Medium',
},
{
href: 'https://youtube.com/@sentineldvpn',
label: 'YouTube',
},
{
href: 'https://omniflix.tv/channel/65b376e8c65a4348750ace8a',
label: 'OmniFlix TV',
},
],
},
{
label: 'Sentinel',
type: 'dropdown',
position: 'right',
items: [
{
href: 'https://sentinel.co',
label: 'Website',
},
{
href: 'https://explorer.sentinel.co',
label: 'Explorer',
},
{
href: 'https://stats.sentinel.co',
label: 'Stats',
},
{
href: 'https://github.com/sentinel-official',
label: 'GitHub',
},
{
href: 'https://sentinelgrowthdao.com',
label: 'Growth DAO',
},
],
},
{
type: 'search',
position: 'right',
},
],
},
footer: {
logo: {
//href: 'http://docs.sentinel.co',
src: '/logo/sentinel-logo-light.svg',
srcDark: '/logo/sentinel-logo-dark.svg',
alt: 'Sentinel Docs',
height: '36px',
},
links: [
{
title: 'Docs',
items: [
{
label: 'Getting Started',
href: '/getting-started/introduction',
},
{
label: 'Sentinel Hub',
href: '/sentinel-hub',
},
{
label: 'Networks',
to: '/networks',
},
{
label: 'Run a Node',
href: '/node-setup',
},
],
},
{
title: 'Resources',
items: [
{
label: 'dVPN Apps',
href: '/getting-started/apps',
},
{
label: 'GitHub',
href: 'https://github.com/sentinel-official',
},
{
label: 'Medium',
href: 'https://medium.com/@sentinel',
},
{
label: 'Sentinel Website',
href: 'https://sentinel.co',
},
],
},
{
title: 'Community',
items: [
{
label: 'X',
href: 'https://x.com/sentineldvpn',
},
{
label: 'Telegram',
href: 'https://t.me/sentineldvpn',
},
{
label: 'Discord',
href: 'https://discord.com/invite/mmAA8qF',
},
{
label: 'Commonwealth',
href: 'https://commonwealth.im/sentinel/',
},
],
},
],
copyright: "Copyright © Sentinel dVPN - Built and maintained by <a href='https://trinitystake.io'>Trinity Stake</a>",
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: [
'bash',
'jsx',
'yaml',
'python',
'markdown',
'toml'
],
},
liveCodeBlock: {
playgroundPosition: 'bottom',
},
algolia: {
// Algolia Application ID
appId: '8LDAK2HFBK',
// Algolia Search-Only API Key
apiKey: 'c9d8f3352bff883ef5cec536ca8ba591',
indexName: 'Docs',
contextualSearch: true,
searchParameters: {},
},
posthog: {
apiKey: '00',
},
}),
// Tally and Kapa.ai Scripts
// scripts: [
// "https://tally.so/widgets/embed.js",
// {
// src: "https://widget.kapa.ai/kapa-widget.bundle.js",
// "data-website-id": "XXX-XXX-XXX",
// "data-project-name": "Sentinel",
// "data-project-color": "#HEX_COLOR_CODE",
// "data-project-logo": "https://LINK_TO_LOGO.com/logo.png",
// async: true,
// },
// ],
};
module.exports = config;