forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docusaurus.config.js
341 lines (334 loc) · 14.5 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const codeInjector = require("./src/remark/code-injector");
// KaTeX plugin stuff
const math = require("remark-math");
const katex = require("rehype-katex");
/** @type {import("@docusaurus/types").Config} */
const config = {
title: "Aptos Docs",
tagline: "Developer Documentation",
url: "https://aptos.dev",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon.ico",
organizationName: "aptos-labs", // Usually your GitHub org/user name.
projectName: "aptos-core", // Usually your repo name.
presets: [
[
"@docusaurus/preset-classic",
/** @type {import("@docusaurus/preset-classic").Options} */
({
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
sidebarCollapsible: false,
editUrl: "https://github.com/aptos-labs/aptos-core/tree/main/developer-docs-site/",
remarkPlugins: [codeInjector, math],
path: "docs",
rehypePlugins: [katex],
},
sitemap: {
changefreq: "daily",
priority: 0.5,
ignorePatterns: ["/tags/**"],
filename: "sitemap.xml",
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
gtag: {
trackingID: "G-HVB7QFB9PQ",
},
}),
],
],
stylesheets: [
{
href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
type: "text/css",
integrity: "sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
crossorigin: "anonymous",
},
],
themeConfig:
/** @type {import("@docusaurus/preset-classic").ThemeConfig} */
({
image: "img/aptos_meta_og_aptos-foundation_docs.jpg",
colorMode: {
defaultMode: "dark",
},
docs: {
sidebar: {
autoCollapseCategories: true,
hideable: true,
},
},
navbar: {
logo: {
alt: "Aptos Labs Logo",
src: "img/aptos_word.svg",
srcDark: "img/aptos_word_dark.svg",
},
items: [
{
href: "https://github.com/aptos-labs/aptos-core/",
label: "GitHub",
position: "right",
},
{
type: "dropdown",
label: "Move",
position: "left",
items: [
{
label: "Move Guides",
type: "doc",
docId: "guides/move-guides/index",
},
{
label: "Your First Move Module",
type: "doc",
docId: "tutorials/first-move-module",
},
],
},
{
type: "dropdown",
label: "Applications",
position: "left",
items: [
{
type: "doc",
label: "Your First Transaction",
docId: "tutorials/first-transaction",
},
{
type: "doc",
label: "Your First DApp",
docId: "tutorials/first-dapp",
},
/*
{
type: "doc",
label: "Your First Coin",
docId: "tutorials/first-coin",
},
*/
{
type: "doc",
label: "Your First NFT",
docId: "tutorials/your-first-nft",
},
],
},
{
type: "dropdown",
label: "Nodes",
position: "left",
items: [
{
label: "Aptos Blockchain Deployments",
type: "doc",
docId: "nodes/aptos-deployments",
},
{
label: "Validators",
type: "doc",
docId: "nodes/validator-node/index",
},
{
label: "FullNodes",
type: "doc",
docId: "nodes/full-node/index",
},
{
label: "Local Testnet",
type: "doc",
docId: "nodes/local-testnet/index",
},
{
label: "Node Health Checker",
type: "doc",
docId: "nodes/node-health-checker/index",
},
],
},
{
position: "left",
href: "https://fullnode.devnet.aptoslabs.com/v1/spec#/",
label: "REST API",
},
{
position: "left",
type: "doc",
docId: "aptos-white-paper/index",
label: "Aptos White Paper",
},
],
},
footer: {
links: [
{
title: null,
items: [
{
html: `
<div class="footer-left">
<a class="footer-logo" href="https://aptosfoundation.org" target="_blank" rel="noopener noreferrer" title="Aptos Foundation">
<svg width="100%" height="100%" version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 112 112" overflow="visible" xml:space="preserve"><path fill="currentColor" d="M86.6 37.4h-9.9c-1.1 0-2.2-.5-3-1.3l-4-4.5c-1.2-1.3-3.1-1.4-4.5-.3l-.3.3-3.4 3.9c-1.1 1.3-2.8 2-4.5 2H2.9C1.4 41.9.4 46.6 0 51.3h51.2c.9 0 1.8-.4 2.4-1l4.8-5c.6-.6 1.4-1 2.3-1h.2c.9 0 1.8.4 2.4 1.1l4 4.5c.8.9 1.9 1.4 3 1.4H112c-.4-4.7-1.4-9.4-2.9-13.8H86.6zM53.8 65l-4-4.5c-1.2-1.3-3.1-1.4-4.5-.3l-.3.3-3.5 3.9c-1.1 1.3-2.7 2-4.4 2H.8c.9 4.8 2.5 9.5 4.6 14h25.5c.9 0 1.7-.4 2.4-1l4.8-5c.6-.6 1.4-1 2.3-1h.2c.9 0 1.8.4 2.4 1.1l4 4.5c.8.9 1.9 1.4 3 1.4h56.6c2.1-4.4 3.7-9.1 4.6-14H56.8c-1.2 0-2.3-.5-3-1.4zm19.6-43.6 4.8-5c.6-.6 1.4-1 2.3-1h.2c.9 0 1.8.4 2.4 1l4 4.5c.8.9 1.9 1.3 3 1.3h10.8c-18.8-24.8-54.1-29.7-79-11-4.1 3.1-7.8 6.8-11 11H71c1 .2 1.8-.2 2.4-.8zM34.7 94.2c-1.2 0-2.3-.5-3-1.3l-4-4.5c-1.2-1.3-3.2-1.4-4.5-.2l-.2.2-3.5 3.9c-1.1 1.3-2.7 2-4.4 2h-.2C36 116.9 71.7 118 94.4 96.7c.9-.8 1.7-1.7 2.6-2.6H34.7z"/></svg>
</a>
<div class="copyright">
<p class="copyright-text">© 2022 Aptos Foundation</p>
<div class="copyright-links">
<a href="https://aptosfoundation.org/privacy" target="_blank">Privacy</a>
<a href="https://aptosfoundation.org/terms" target="_blank">Terms</a></div>
</div>
</div>
`,
},
],
},
{
title: null,
items: [
{
html: `
<p class="right">
<nav class="social-links">
<a class="social-link" href="https://github.com/aptoslabs" target="_blank" rel="noopener noreferrer" title="Github">
<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 0C4.47514 0 0 4.47514 0 10C0 14.4199 2.86679 18.1645 6.83855 19.4905C7.33579 19.5826 7.51995 19.2756 7.51995 19.0055C7.51995 18.7661 7.51381 18.14 7.50767 17.3051C4.72683 17.9067 4.13751 15.9668 4.13751 15.9668C3.68324 14.8128 3.0264 14.5058 3.0264 14.5058C2.11786 13.8858 3.09392 13.8981 3.09392 13.8981C4.09454 13.9718 4.62861 14.9294 4.62861 14.9294C5.51872 16.4579 6.96746 16.016 7.53837 15.7581C7.63045 15.1136 7.88827 14.6716 8.17066 14.4199C5.94843 14.1682 3.61571 13.3088 3.61571 9.47821C3.61571 8.38551 4.00246 7.4954 4.64702 6.79558C4.54266 6.54389 4.19889 5.52486 4.74524 4.14978C4.74524 4.14978 5.58625 3.87968 7.4954 5.17495C8.29343 4.95396 9.14672 4.84346 10 4.83732C10.8471 4.83732 11.7066 4.95396 12.5046 5.17495C14.4137 3.87968 15.2548 4.14978 15.2548 4.14978C15.8011 5.52486 15.4573 6.54389 15.353 6.79558C15.9914 7.4954 16.3781 8.38551 16.3781 9.47821C16.3781 13.3211 14.0393 14.1621 11.8109 14.4137C12.167 14.7207 12.4923 15.3346 12.4923 16.2676C12.4923 17.6059 12.48 18.6802 12.48 19.0117C12.48 19.2818 12.6581 19.5887 13.1676 19.4905C17.1393 18.1645 20 14.4199 20 10.0061C20 4.47514 15.5249 0 10 0Z" fill="currentColor"/></svg>
</a>
<a class="social-link" href="https://discord.gg/aptoslabs" target="_blank" rel="noopener noreferrer" title="Discord">
<svg width="100%" height="100%" viewBox="0 0 71 55" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><path d="M60.105 4.898A58.55 58.55 0 0 0 45.653.415a.22.22 0 0 0-.233.11 40.784 40.784 0 0 0-1.8 3.697c-5.456-.817-10.886-.817-16.23 0-.485-1.164-1.201-2.587-1.828-3.697a.228.228 0 0 0-.233-.11 58.386 58.386 0 0 0-14.451 4.483.207.207 0 0 0-.095.082C1.578 18.73-.944 32.144.293 45.39a.244.244 0 0 0 .093.167c6.073 4.46 11.955 7.167 17.729 8.962a.23.23 0 0 0 .249-.082 42.08 42.08 0 0 0 3.627-5.9.225.225 0 0 0-.123-.312 38.772 38.772 0 0 1-5.539-2.64.228.228 0 0 1-.022-.378 31.17 31.17 0 0 0 1.1-.862.22.22 0 0 1 .23-.03c11.619 5.304 24.198 5.304 35.68 0a.219.219 0 0 1 .233.027c.356.293.728.586 1.103.865a.228.228 0 0 1-.02.378 36.384 36.384 0 0 1-5.54 2.637.227.227 0 0 0-.121.315 47.249 47.249 0 0 0 3.624 5.897.225.225 0 0 0 .249.084c5.801-1.794 11.684-4.502 17.757-8.961a.228.228 0 0 0 .092-.164c1.48-15.315-2.48-28.618-10.497-40.412a.18.18 0 0 0-.093-.084Zm-36.38 32.427c-3.497 0-6.38-3.211-6.38-7.156 0-3.944 2.827-7.156 6.38-7.156 3.583 0 6.438 3.24 6.382 7.156 0 3.945-2.827 7.156-6.381 7.156Zm23.593 0c-3.498 0-6.38-3.211-6.38-7.156 0-3.944 2.826-7.156 6.38-7.156 3.582 0 6.437 3.24 6.38 7.156 0 3.945-2.798 7.156-6.38 7.156Z" fill="currentColor"/></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h71v55H0z"/></clipPath></defs></svg>
</a>
<a class="social-link" href="https://twitter.com/aptosfoundation" target="_blank" rel="noopener noreferrer" title="Twitter">
<svg width="100%" height="100%" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M22 2.013a9.395 9.395 0 0 1-2.593.676A4.348 4.348 0 0 0 21.392.314a9.341 9.341 0 0 1-2.866 1.042A4.62 4.62 0 0 0 15.232 0c-2.493 0-4.514 1.922-4.514 4.292 0 .336.04.664.117.978C7.083 5.09 3.758 3.382 1.532.786A4.115 4.115 0 0 0 .92 2.944c0 1.489.796 2.802 2.007 3.571A4.669 4.669 0 0 1 .884 5.98v.053c0 2.08 1.555 3.815 3.62 4.209a4.744 4.744 0 0 1-2.038.074c.574 1.705 2.241 2.945 4.216 2.98a9.358 9.358 0 0 1-5.605 1.837c-.365 0-.724-.02-1.077-.06A13.257 13.257 0 0 0 6.918 17c8.303 0 12.843-6.54 12.843-12.21 0-.187-.004-.372-.013-.556A8.929 8.929 0 0 0 22 2.013Z" fill="currentColor"/></svg>
</a>
</nav>
</p>
`,
},
],
},
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["rust"],
},
algolia: {
appId: "HM7UY0NMLG",
apiKey: "63c5819714b74e64977337e61a1e3ae6",
indexName: "aptos",
contextualSearch: true,
debug: false,
},
}),
plugins: [
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
to: "/nodes/full-node/public-fullnode",
from: "/nodes/full-node/fullnode-for-devnet",
},
{
to: "/nodes/full-node/public-fullnode",
from: "/tutorials/run-a-fullnode",
},
{
to: "/nodes/aptos-deployments",
from: "/tutorials/local-testnet-devnet-and-incentivized-testnet",
},
{
to: "/nodes/full-node/run-a-fullnode-on-gcp",
from: "/tutorials/run-a-fullnode-on-gcp",
},
{
to: "/nodes/validator-node/validators",
from: [
"/tutorials/validator-node/run-validator-node-using-gcp",
"/tutorials/validator-node/run-validator-node-using-aws",
"/tutorials/validator-node/run-validator-node-using-azure",
"/tutorials/validator-node/run-validator-node-using-docker",
"/tutorials/validator-node/run-validator-node-using-source",
],
},
{
to: "/concepts/aptos-concepts",
from: [
"/basics/basics-txns-states",
"/basics/basics-accounts",
"/basics/basics-events",
"/basics/basics-gas-txn-fee",
"/basics/basics-merkle-proof",
"/basics/basics-fullnodes",
"/basics/basics-validator-nodes",
"/basics/basics-node-networks-sync",
],
},
{
to: "/nodes/local-testnet/run-a-local-testnet",
from: "/nodes/run-a-local-testnet",
},
{
to: "/concepts/staking",
from: "/nodes/staking",
},
{
to: "/tutorials/your-first-nft",
from: "/tutorials/your-first-nft-sdk",
},
{
to: "/tutorials/your-first-transaction",
from: "/tutorials/your-first-transaction-sdk",
},
{
to: "/tutorials/first-move-module",
from: "/tutorials/first-move-module-cli",
},
{
to: "/sdks/ts-sdk/index",
from: "/sdks/typescript-sdk",
},
{
to: "/guides/getting-started",
from: "/aptos-developer-resources",
},
{
to: "/concepts/basics-txns-states",
from: "/concepts/basics-merkle-proof",
},
{
to: "/nodes/validator-node/operator/connect-to-aptos-network",
from: "/nodes/ait/connect-to-testnet",
},
{
to: "/nodes/validator-node/operator/node-requirements",
from: "/nodes/ait/node-requirements",
},
{
to: "/nodes/validator-node/operator/node-liveness-criteria",
from: "/nodes/ait/node-liveness-criteria",
},
{
to: "/issues-and-workarounds",
from: "/nodes/full-node/troubleshooting-fullnode-setup",
},
{
to: "/guides/state-sync",
from: "/concepts/state-sync",
},
],
},
],
],
};
module.exports = config;