forked from stellar/stellar-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
366 lines (364 loc) · 10.9 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
// @ts-check
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Stellar Docs",
tagline:
"Stellar is a self-serve distributed ledger that you can use as a backend to power all kinds of apps and services",
url: "https://developers.stellar.org",
baseUrl: "/",
trailingSlash: false,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon-96x96.png",
organizationName: "stellar",
projectName: "stellar-docs",
i18n: {
defaultLocale: "en",
locales: ["en"],
},
plugins: [
"docusaurus-plugin-sass",
[
"docusaurus-plugin-sentry",
{
DSN: "efc31f19f9c54082b8d993bfb62eee57",
},
],
[
"docusaurus-plugin-openapi-docs",
{
id: "openapi",
docsPluginId: "network",
config: {
horizon: {
specPath: "openapi/horizon/bundled.yml", // Path to designated spec file
outputDir: "network/horizon/resources", // Output directory for generated .mdx docs
sidebarOptions: {
groupPathsBy: "tag",
},
},
anchor_platform_api: {
specPath: "openapi/anchor-platform/bundled.yml", // Path to designated spec file
outputDir: "network/anchor-platform/resources", // Output directory for generated .mdx docs
sidebarOptions: {
groupPathsBy: "tag",
},
template: "src/template.mustache", // Customize API MDX with mustache template
},
anchor_platform_callbacks: {
specPath: "openapi/anchor-platform/bundled_callback.yml", // Path to designated spec file
outputDir: "network/anchor-platform/callbacks", // Output directory for generated .mdx docs
sidebarOptions: {
groupPathsBy: "tag",
},
template: "src/template.mustache", // Customize API MDX with mustache template
},
anchor_custody_api: {
specPath: "openapi/anchor-platform/bundled_custody.yml", // Path to designated spec file
outputDir: "network/anchor-platform/custody-server", // Output directory for generated .mdx docs
sidebarOptions: {
groupPathsBy: "tag",
},
template: "src/template.mustache", // Customize API MDX with mustache template
},
stellar_disbursement_platform: {
specPath: "openapi/stellar-disbursement-platform/bundled.yml", // Path to designated spec file
outputDir: "network/stellar-disbursement-platform/resources", // Output directory for generated .mdx docs
sidebarOptions: {
groupPathsBy: "tag",
},
template: "src/template.mustache", // Customize API MDX with mustache template
}
},
},
],
[
"@docusaurus/plugin-content-docs",
{
id: "network",
path: "network",
routeBasePath: "/network",
docLayoutComponent: "@theme/DocPage",
docItemComponent: "@theme/ApiItem",
sidebarPath: require.resolve("./sidebarsNetwork.js"),
sidebarItemsGenerator: require("./src/sidebar-network-generator"),
editUrl: "https://github.com/stellar/stellar-docs/tree/main",
exclude: ['**/component/**', '**/README.md'],
showLastUpdateTime: true,
showLastUpdateAuthor: true,
},
],
require("./src/analytics-module"),
require("./src/dev-server-plugin"),
],
themes: ["docusaurus-theme-openapi-docs"],
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
blog: {
path: 'meeting-notes',
blogTitle: 'Meeting Notes',
blogDescription: 'Notes and recordings from the Soroban protocol & developers meetings',
blogSidebarTitle: 'All meetings',
blogSidebarCount: 'ALL',
postsPerPage: 'ALL',
routeBasePath: 'meetings',
},
docs: {
showLastUpdateTime: true,
showLastUpdateAuthor: true,
breadcrumbs: true,
routeBasePath: "/docs",
remarkPlugins: [require("mdx-mermaid"), require('remark-math'), [
require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }
]],
rehypePlugins: [require('rehype-katex')],
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://github.com/stellar/stellar-docs/tree/main",
exclude: ['**/component/**', '**/README.md'],
},
theme: {
customCss: [require.resolve("./src/css/custom.scss")],
},
gtag: {
trackingID: "G-ZCT4GYX8KN",
anonymizeIP: true,
}
}),
],
],
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} */
({
docs: {
sidebar: {
autoCollapseCategories: false,
},
},
navbar: {
logo: {
width: 100,
src: "img/stellar-logo.svg",
srcDark: "img/stellar-logo-dark.svg",
href: "/",
},
items: [
{
type: 'docSidebar',
sidebarId: 'docs',
label: 'Docs',
position: 'left',
},
{
type: 'docSidebar',
sidebarId: 'smartContracts',
label: 'Smart Contracts',
position: 'left',
},
{
type: 'docSidebar',
sidebarId: 'learn',
label: 'Learn',
position: 'left',
},
{
type: 'docSidebar',
sidebarId: 'tools',
label: 'Tools',
position: 'left',
},
{
type: 'docSidebar',
sidebarId: 'reference',
label: 'Reference',
position: 'left',
},
{
type: "dropdown",
label: "Network",
position: "left",
to: '/network',
items: [
{
type: 'html',
value: '<small>Data Availability</small>',
className: 'subtitle',
},
{
to: "/network/soroban-rpc",
label: "Soroban RPC",
},
{
to: "/network/hubble",
label: "Hubble",
},
{
to: "/network/horizon",
label: "Horizon",
},
{
type: 'html',
value: '<hr><small>Platforms</small>',
className: 'subtitle',
},
{
to: "/network/anchor-platform",
label: "Anchor Platform",
},
{
to: "/network/stellar-disbursement-platform",
label: "Stellar Disbursement Platform",
},
{
type: 'html',
value: '<hr><small>Network Infrastructure</small>',
className: 'subtitle',
},
{
to: "/network/core-node",
label: "Core Validator Node",
},
]
},
{
to: '/meetings',
label: 'Meetings',
position: 'right',
},
{
href: "https://github.com/stellar/stellar-docs",
label: "GitHub",
position: "right",
},
{
href: "https://discord.gg/stellardev",
label: "Discord",
position: "right",
},
{
type: "search",
position: "right",
},
],
},
algolia: {
appId: "VNSJF5AWIZ",
apiKey: "c932e7670879e29070e269d202fb6740",
indexName: "crawler_Stellar Docs - Docusaurus",
},
footer: {
links: [
{
title: "Resources",
items: [
{
label: "Developer Blog",
href: "https://www.stellar.org/developers-blog",
},
{
label: "Stellar Quest",
href: "https://quest.stellar.org/",
},
{
label: "Soroban Quest",
href: "https://fastcheapandoutofcontrol.com/tutorial",
},
],
},
{
title: "Tools",
items: [
{
label: "Explorer",
href: "https://stellar.expert",
},
{
label: "Laboratory",
href: "https://laboratory.stellar.org",
},
{
label: "Status",
href: "https://status.stellar.org/",
},
{
label: "Dashboard",
href: "https://dashboard.stellar.org/",
},
{
label: "All Tools",
href: "https://developers.stellar.org/docs/tools/developer-tools",
},
],
},
{
title: "Community",
items: [
{
label: "Developer Discord",
href: "https://discord.gg/st7Mxd58BV",
},
{
label: "Developer Google Group",
href: "https://groups.google.com/g/stellar-dev",
},
{
label: "Stack Exchange",
href: "https://stellar.stackexchange.com/",
},
{
label: "Stellar Community Fund",
href: "https://communityfund.stellar.org/",
},
],
},
{
title: "About",
items: [
{
label: "About SDF",
href: "https://stellar.org/foundation",
},
{
label: "Careers",
href: "https://stellar.org/foundation/careers",
},
{
label: "Events",
href: "https://stellar.org/events",
},
{
label: "Grants & Funding",
href: "https://stellar.org/foundation/grants-and-funding",
},
],
},
],
},
prism: {
theme: require("prism-react-renderer/themes/github"),
darkTheme: require("prism-react-renderer/themes/vsDark"),
additionalLanguages: [
"java",
"scala",
"rust",
"toml",
"json5",
"python",
"docker",
"kotlin",
"dart"
],
},
}),
};
module.exports = config;