-
Notifications
You must be signed in to change notification settings - Fork 919
/
docusaurus.config.js
357 lines (345 loc) · 11.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
// GitHub Settings
const vars = require('./variables')
// enable or disable the announcement header bar (see 'announcementBar' section below)
const isAnnouncementActive = false;
// Docusaurus Config
module.exports = {
title: "Cardano Developer Portal",
tagline: "Let’s build together",
url: "https://developers.cardano.org",
baseUrl: "/",
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "cardano-foundation",
projectName: "developer-portal",
customFields: {
repository: `${vars.repository}`,
branch: `${vars.branch}`,
},
themeConfig: {
// Docs Sidebar
docs: {
sidebar: {
hideable: true,
}
},
// Additional Language Syntax Highlighting
prism: {
additionalLanguages: ['csharp', 'php'],
},
// Announcement Bar
// id: always change it when changing the announcement
// backgroundColor: use #FD7575 for warnings and #2AA18A for announcements
announcementBar: isAnnouncementActive ?{
id: "announcement_index5", // Any value that will identify this message + increment the number every time to be unique
content:
`<strong>Calling all Cardano developers! Your experience matters, take the annual <a target="_blank" rel="noopener noreferrer" href="https://cardanofoundation.outgrow.us/cardano-developer-ecosystem-survey-2024">Developer Ecosystem Survey</a> ⭐️</strong>`,
backgroundColor: "#2AA18A",
textColor: "#FFFFFF", // Use #FFFFFF
isCloseable: true, // Use true
}: undefined,
// Meta Image that will be used for your meta tag, in particular og:image and twitter:image
// Relative to your site's "static" directory, cannot be SVGs.
image: "img/og/og-developer-portal.png",
metadata: [{ name: "twitter:card", content: "summary" }],
// Algolia Search
algolia: {
appId: "6QH8YVQXAE",
apiKey: "6033c09f3af6454c8c25efce0460b84a",
indexName: "developer-portal",
contextualSearch: true,
},
// Navbar title, logo and items
navbar: {
hideOnScroll: false,
title: "Developers",
logo: {
alt: "Cardano Logo",
src: "img/cardano-black.svg",
srcDark: "img/cardano-white.svg",
},
items: [
{
to: "docs/get-started/",
label: "Get Started",
position: "left",
},
{
to: "tools",
label: "Builder Tools",
position: "left",
},
{
to: "showcase",
label: "Showcase",
position: "left",
},
{
to: "blog/",
label: "Dev Blog",
position: "left",
},
{
href: "https://docs.cardano.org/en/latest/",
label: "Docs",
position: "left",
},
{
href: `${vars.repository}`,
position: "right",
className: "header-github-link",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Developer Portal",
items: [
{
label: "Contributors",
to: "docs/portal-contributors/",
},
{
label: "Changelog",
to: "/changelog",
},
{
label: "How to Contribute",
to: "docs/portal-contribute/",
},
{
label: "Style Guide",
to: "docs/portal-style-guide",
},
{
label: "Suggest Content",
href: "https://github.com/cardano-foundation/developer-portal/discussions/161",
},
{
label: "Raise an Issue",
href: "https://github.com/cardano-foundation/developer-portal/issues",
},
],
},
{
title: "Developer Community",
items: [
{
label: "Stack Exchange",
href: "https://cardano.stackexchange.com",
},
{
label: "Cardano Forum",
href: "https://forum.cardano.org/c/developers/29",
},
{
label: "Developer Portal Discord",
href: "https://discord.com/invite/Exe6XmqKDx",
},
{
label: "Developer Ecosystem Survey",
href: "https://cardano-foundation.github.io/state-of-the-developer-ecosystem",
},
{
label: "More",
to: "docs/get-started/cardano-developer-community",
},
],
},
{
title: "More about Cardano",
items: [
{
label: "Careers on Cardano",
to: "docs/careers",
},
{
label: "Cardano Enterprise",
href: "https://cardano.org/enterprise",
},
{
label: "Cardano Foundation",
href: "https://www.cardanofoundation.org",
},
{
label: "Development Updates",
href: "https://cardanoupdates.com",
},
{
label: "Ouroboros Protocol",
href: "https://cardano.org/ouroboros/",
},
],
},
],
// Let's use the copyright footer for terms and privacy policy for now
copyright: `<a href="https://cardanofoundation.org/en/terms-and-conditions" target="_blank" rel="noopener noreferrer" style="color: #ebedf0;">Terms</a> | <a href="https://cardanofoundation.org/en/privacy" target="_blank" rel="noopener noreferrer" style="color: #ebedf0;">Privacy Policy</a>`,
},
},
plugins: [
[
"@docusaurus/plugin-ideal-image",
{
quality: 70,
max: 1030, // max resized image's size.
min: 640, // min resized image's size. if original is lower, use that size.
steps: 2, // the max number of images generated between min and max (inclusive)
},
],
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
// redirect the old smart contracts signpost to the new smart contract category
to: '/docs/smart-contracts/',
from: '/docs/get-started/smart-contracts-signpost',
},
{
// redirect the old funding category overview to the new governance category
to: '/docs/governance/',
from: '/docs/fund-your-project/',
},
{
// redirect to the new catalyst page
to: '/docs/governance/project-catalyst',
from: ['/docs/fund-your-project/project-catalyst', '/docs/fund-your-project/alternatives']
},
{
// redirect the old cardano improvement proposal overview
to: '/docs/governance/cardano-improvement-proposals/CIP-0001',
from: '/docs/governance/cardano-improvement-proposals/',
},
{
// redirect as many pages as possible from old SPO course to new SPO course
// (any old page not existing on new course, include in redirection to top level)
to: '/docs/operate-a-stake-pool/',
from: [
'/docs/stake-pool-course/',
'/docs/stake-pool-course/lesson-1',
'/docs/stake-pool-course/lesson-2',
'/docs/stake-pool-course/lesson-3',
'/docs/stake-pool-course/lesson-4',
'/docs/stake-pool-course/lesson-5',
'/docs/stake-pool-course/handbook/setup-virtual-box-written',
'/docs/stake-pool-course/handbook/setup-a-server-on-aws-written',
'/docs/stake-pool-course/assignments/assignment-1',
'/docs/stake-pool-course/assignments/assignment-2',
'/docs/stake-pool-course/assignments/kes_period'
]
},
{
to: '/docs/operate-a-stake-pool/introduction-to-cardano/',
from: '/docs/stake-pool-course/introduction-to-cardano',
},
{
to: '/docs/operate-a-stake-pool/grafana-dashboard-tutorial/',
from: [
'/docs/stake-pool-course/handbook/grafana-dashboard-tutorial',
'/docs/stake-pool-course/handbook/grafana-loki',
'/docs/stake-pool-course/handbook/apply-logging-prometheus',
]
},
{
to: '/docs/operate-a-stake-pool/hardening-server/',
from: '/docs/stake-pool-course/handbook/setup-firewall',
},
{
to: '/docs/operate-a-stake-pool/node-installation-process/',
from: '/docs/stake-pool-course/handbook/install-cardano-node-written',
},
{
to: '/docs/get-started/cardano-node/running-cardano/',
from: '/docs/stake-pool-course/handbook/run-cardano-node-handbook',
},
{
to: '/docs/get-started/create-simple-transaction/',
from: [
'/docs/stake-pool-course/handbook/use-cli',
'/docs/stake-pool-course/handbook/create-simple-transaction',
]
},
{
to: '/docs/get-started/technical-concepts/',
from: '/docs/stake-pool-course/handbook/utxo-model',
},
{
to: '/docs/operate-a-stake-pool/cardano-key-pairs/',
from: '/docs/stake-pool-course/handbook/keys-addresses',
},
{
to: '/docs/operate-a-stake-pool/generating-wallet-keys/',
from: '/docs/stake-pool-course/handbook/create-stake-pool-keys',
},
{
to: '/docs/operate-a-stake-pool/register-stake-address/',
from: '/docs/stake-pool-course/handbook/register-stake-keys',
},
{
to: '/docs/operate-a-stake-pool/register-stake-pool/',
from: [
'/docs/stake-pool-course/handbook/generate-stake-pool-keys',
'/docs/stake-pool-course/handbook/register-stake-pool-metadata',
]
},
{
to: '/docs/operate-a-stake-pool/cardano-relay-configuration/',
from: '/docs/stake-pool-course/handbook/configure-topology-files',
},
],
},
],
[
require.resolve('./src/plugins/changelog/index.js'),
{
blogTitle: 'Developer Portal Changelog',
blogDescription:
'Keep yourself up-to-date about new features in every release',
blogSidebarCount: 'ALL',
blogSidebarTitle: 'Changelog',
routeBasePath: '/changelog',
showReadingTime: false,
postsPerPage: 20,
archiveBasePath: null,
authorsMapPath: 'authors.json',
feedOptions: {
type: 'all',
title: 'Developer Portal Changelog',
description:
'Keep yourself up-to-date about new features in every release',
language: 'en',
},
},
],
],
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
showLastUpdateAuthor: true,
showLastUpdateTime: true,
sidebarPath: require.resolve("./sidebars.js"),
editUrl: `${vars.repository}/edit/${vars.branch}`,
},
blog: {
showReadingTime: true,
editUrl: `${vars.repository}/edit/${vars.branch}`,
blogSidebarCount: 'ALL',
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
gtag: {
// You can also use your "G-" Measurement ID here.
trackingID: 'GTM-5NM3NX4',
// Optional fields.
anonymizeIP: true, // Should IPs be anonymized?
},
},
],
],
};