-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
503 lines (493 loc) · 17.8 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
503 lines (493 loc) · 17.8 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
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
// @ts-check
const { themes } = require("prism-react-renderer");
const lightTheme = themes.github;
const darkTheme = themes.dracula;
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Learn Bittensor - Developer Guides",
tagline: "Guides and tutorials for the Bittensor network",
favicon: "favicon.ico",
headTags: [
{
tagName: "link",
attributes: {
rel: "icon",
type: "image/png",
sizes: "32x32",
href: "/favicon-32x32.png",
},
},
{
tagName: "link",
attributes: {
rel: "icon",
type: "image/png",
sizes: "16x16",
href: "/favicon-16x16.png",
},
},
{
tagName: "link",
attributes: {
rel: "apple-touch-icon",
sizes: "180x180",
href: "/apple-touch-icon.png",
},
},
],
trailingSlash: false,
url: "https://guides.learnbittensor.org",
baseUrl: "/",
organizationName: "latent-to",
projectName: "developer-docs",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
customFields: {
enableIssueLinks: true,
enableEditUrlLinks: true,
issueBaseUrl: "https://github.com/latent-to/developer-docs/issues",
enableFeedback: false,
},
i18n: {
defaultLocale: "en",
locales: ["en"],
},
presets: [
[
"@docusaurus/preset-classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/",
path: "docs",
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
sidebarPath: require.resolve("./sidebars.js"),
sidebarCollapsible: true,
showLastUpdateTime: true,
docItemComponent: "@theme/DocItem",
editUrl: "https://github.com/latent-to/developer-docs/blob/main/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
plugins: [
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
to: "/keys/proxies/working-with-proxies",
from: "/keys/proxies/create-proxy",
},
{
from: "/keys/proxies/staking-with-proxy",
to: "/staking-and-delegation/managing-stake-sdk",
},
{
from: "/staking-and-delegation/managing-stake-btcli",
to: "/staking-and-delegation/managing-stake-sdk",
},
{
from: "/staking-and-delegation/stakers-btcli-guide",
to: "/staking-and-delegation/managing-stake-sdk",
},
{
to: "/subnets/understanding-multiple-mech-subnets",
from: "/subnets/understanding-sub-subnets",
},
{
to: "/staking-and-delegation/staking-polkadot-js",
from: "/staking/staking-polkadot-js",
},
{
to: "/staking-and-delegation/delegation",
from: "/staking",
},
{
to: "/staking-and-delegation/delegation",
from: "/staking-and-delegation/staking",
},
{
from: "/subnets/register-validate-mine",
to: "/validators",
},
{
to: "/errors",
from: "/subtensor-nodes/subtensor-error-messages",
},
{
from: "/glossary",
to: "/resources/glossary",
},
{
from: "/questions-and-answers",
to: "/resources/questions-and-answers",
},
{
to: "/keys/coldkey-swap",
from: "/keys/schedule-coldkey-swap",
},
{
from: "/emissions",
to: "/learn/emissions",
},
{
from: "/yuma-consensus",
to: "/learn/yuma-consensus",
},
{
from: "/subnets/yc3-blog",
to: "/learn/yc3-blog",
},
{
from: "/fees",
to: "/learn/fees",
},
{
from: "/community-links",
to: "/resources/community-links",
},
{
from: "/subnets/yuma3-migration-guide",
to: "/learn/yuma3-migration-guide",
},
{
from: "/subnets/child-hotkeys",
to: "/validators/child-hotkeys",
},
{
from: "/btcli-permissions",
to: "/btcli/btcli-permissions",
},
{
from: "/migration_guide",
to: "/sdk/migration-guide",
},
{
from: "/getting-started/wallets",
to: "/keys/wallets",
},
{
from: "/getting-started/coldkey-hotkey-security",
to: "/keys/coldkey-hotkey-security",
},
{
from: "/working-with-keys",
to: "/keys/working-with-keys",
},
{
from: "/tools",
to: "/concepts/tools",
},
{
from: "/bittensor-networks",
to: "/concepts/bittensor-networks",
},
{
from: "/commit-reveal",
to: "/concepts/commit-reveal",
},
{
from: "/consensus-based-weights",
to: "/concepts/consensus-based-weights",
},
{
from: "/bt-logging-levels",
to: "/concepts/bt-logging-levels",
},
{
from: "/utilities",
to: "/resources/utilities",
},
{
from: "/senate",
to: "/governance/senate",
},
{
from: "/concepts/weight-copying-in-bittensor",
to: "/learn/weight-copying-in-bittensor",
},
{
from: "/learn/avoid-staking-proxy-attacks",
to: "/keys/proxies/avoid-staking-proxy-attacks",
},
{
from: "/learn/price-protection",
to: "/staking-and-delegation/price-protection",
},
{
from: "/learn/balancer-amm",
to: "/staking-and-delegation/balancer-amm",
},
{
from: "/learn/slippage",
to: "/staking-and-delegation/slippage",
},
{
from: "/getting-started/installation",
to: "/sdk/installation",
},
{
from: "/getting-started/install-btcli",
to: "/btcli/install-btcli",
},
{
from: "/errors/subtensor",
to: "/subtensor-api/errors",
},
{
from: "/errors-and-troubleshooting",
to: "/errors/troubleshooting",
},
{
from: "/media-assets",
to: "/resources/media-assets",
},
{
from: "/subtensor-nodes/using-docker",
to: "/subtensor-nodes/run/using-docker",
},
{
from: "/subtensor-nodes/using-source",
to: "/subtensor-nodes/run/using-source",
},
{
from: "/liquidity-positions/liquidity-positions",
to: "/staking-and-delegation/balancer-amm",
},
{
from: "/liquidity-positions/managing-liquidity-positions",
to: "/staking-and-delegation/balancer-amm",
},
],
},
],
],
scripts: [
{
src: "https://unpkg.com/@antonz/codapi@0.19.10/dist/settings.js",
defer: true,
},
{
src: "https://unpkg.com/@antonz/codapi@0.19.10/dist/snippet.js",
defer: true,
},
],
stylesheets: [
{
href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css",
type: "text/css",
integrity:
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
crossorigin: "anonymous",
},
{
href: "https://unpkg.com/@antonz/codapi@0.19.10/dist/snippet.css",
},
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/lb-logo.png",
metadata: [
{ property: "og:type", content: "website" },
{ property: "og:site_name", content: "Learn Bittensor" },
],
announcementBar: {
id: "package_source",
content:
'<span class="lb-notice"><span class="lb-notice__badge">Security</span><span class="lb-notice__text"><span class="lb-notice__long">⚠️ Only use links and commands directly from our docs or official release announcements to avoid malicious lookalikes.</span><span class="lb-notice__short">⚠️ Only use links from our official docs.</span></span></span>',
backgroundColor: "#6366f1",
textColor: "#ffffff",
isCloseable: true,
},
docs: {
sidebar: {
autoCollapseCategories: true,
hideable: false,
},
},
navbar: {
logo: {
alt: "Learn Bittensor",
src: "img/learnbittensor_light.png",
srcDark: "img/learnbittensor_dark.png",
href: "https://guides.learnbittensor.org",
width: 179,
height: 24,
style: {
objectFit: "contain",
height: 24,
width: "auto",
},
},
items: [
{
type: "dropdown",
label: "Get started",
position: "left",
activeBaseRegex: "^/(keys|miners|validators|staking-and-delegation|subnets|tutorials)(/|$)",
className: "docs-dropdown",
items: [
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Introduction</span><span class="lb-mega-item__desc">Learn what Bittensor is and how the network works</span></span>',
to: "/learn/introduction",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Wallets and Keys</span><span class="lb-mega-item__desc">Create and secure your coldkeys and hotkeys</span></span>',
to: "/keys/wallets",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Mining</span><span class="lb-mega-item__desc">Run a miner and produce digital commodities on a subnet</span></span>',
to: "/miners",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Validating</span><span class="lb-mega-item__desc">Evaluate miner work and earn emissions as a validator</span></span>',
to: "/validators",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Manage subnets</span><span class="lb-mega-item__desc">Create and operate your own Bittensor subnet</span></span>',
to: "/subnets/create-a-subnet",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Stake and delegate</span><span class="lb-mega-item__desc">Put TAO to work by delegating to a validator</span></span>',
to: "/staking-and-delegation/delegation",
},
],
},
{
type: "dropdown",
label: "Learn",
position: "left",
activeBaseRegex: "^/(learn|concepts|resources|navigating-subtensor|governance)(/|$)",
items: [
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Emissions</span><span class="lb-mega-item__desc">How TAO is minted and shared out every block</span></span>',
to: "/learn/emissions",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Yuma Consensus</span><span class="lb-mega-item__desc">How validator weights turn into miner rewards</span></span>',
to: "/learn/yuma-consensus",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Subnets</span><span class="lb-mega-item__desc">What subnets are and how they fit together</span></span>',
to: "/subnets/understanding-subnets",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Incentive mechanisms</span><span class="lb-mega-item__desc">How a subnet decides what work is worth rewarding</span></span>',
to: "/learn/anatomy-of-incentive-mechanism",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Transaction fees</span><span class="lb-mega-item__desc">What each on-chain action costs and why</span></span>',
to: "/learn/fees",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Glossary</span><span class="lb-mega-item__desc">Plain definitions for the terms used across these docs</span></span>',
to: "/resources/glossary",
},
],
},
{
type: "dropdown",
label: "Reference",
position: "left",
activeBaseRegex: "^/(sdk|btcli|subtensor-api|errors|local-build|subtensor-nodes)(/|$)",
items: [
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Python SDK</span><span class="lb-mega-item__desc">Build against Bittensor from Python</span></span>',
to: "/sdk",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Bittensor CLI</span><span class="lb-mega-item__desc">Manage wallets, stake and subnets from the terminal</span></span>',
to: "/btcli/overview",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Subtensor API</span><span class="lb-mega-item__desc">Extrinsics, storage, events and constants</span></span>',
to: "/subtensor-api",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Subnet hyperparameters</span><span class="lb-mega-item__desc">Every subnet setting and what changing it does</span></span>',
to: "/subnets/subnet-hyperparameters",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Error codes</span><span class="lb-mega-item__desc">Look up a Subtensor error and what triggers it</span></span>',
to: "/errors",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Troubleshooting</span><span class="lb-mega-item__desc">Fixes for the problems people hit most often</span></span>',
to: "/errors/troubleshooting",
},
],
},
{
type: "dropdown",
label: "Bittensor EVM",
position: "left",
activeBaseRegex: "^/evm-tutorials(/|$)",
items: [
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">EVM smart contracts</span><span class="lb-mega-item__desc">Deploy and interact with smart contracts on the Bittensor EVM</span></span>',
to: "/evm-tutorials",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Token Bridging</span><span class="lb-mega-item__desc">Bridge tokens to and from the Bittensor EVM</span></span>',
to: "/evm-tutorials/bridge-vtao",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Convert H160 to SS58</span><span class="lb-mega-item__desc">Map Ethereum H160 addresses to Substrate SS58 format</span></span>',
to: "/evm-tutorials/convert-h160-to-ss58",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">Precompiles</span><span class="lb-mega-item__desc">Call staking, subnet and metagraph precompiles from Solidity</span></span>',
to: "/evm-tutorials/examples",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">EVM networks</span><span class="lb-mega-item__desc">Endpoints and chain IDs for mainnet, testnet and localnet</span></span>',
to: "/evm-tutorials/subtensor-networks",
},
{
html: '<span class="lb-mega-item"><span class="lb-mega-item__label">EVM troubleshooting</span><span class="lb-mega-item__desc">Gas, opcode and pending-transaction problems</span></span>',
to: "/evm-tutorials/troubleshooting",
},
],
},
{
type: "search",
position: "right",
className: "custom_algolia",
},
{
href: "https://github.com/latent-to/developer-docs",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
prism: {
theme: lightTheme,
darkTheme: darkTheme,
additionalLanguages: ["bash", "python", "diff", "json", "yaml"],
},
algolia: {
appId: "UXNFOAH677",
apiKey: "72af66272aba6bd27e76ac6f7eec0068",
indexName: "learnbittensor",
contextualSearch: true,
insights: true,
debug: false,
searchPagePath: "search",
},
footer: {
// Rendered by swizzled Footer/Copyright (brand mark, links, social).
copyright: "© Learn Bittensor",
},
}),
};
module.exports = config;