-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathdocusaurus.config.js
323 lines (307 loc) · 10.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
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
// Dotenv is a zero-dependency module that loads environment
// variables from a .env file into process.env
import 'dotenv/config';
// GitHub Settings to setup repository and branch customFields
const vars = require('./variables')
// enable or disable the announcement header bar (see 'announcementBar' section below)
const isAnnouncementActive = false;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Cardano',
tagline: 'Making The World Work Better For All',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://cardano.org',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'cardano-foundation',
projectName: 'www-cardano-org',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
onBrokenAnchors: 'warn',
customFields: {
repository: `${vars.repository}`,
branch: `${vars.branch}`,
// put your blockfrost id in your .env file
REACT_APP_BLOCKFROST_APP_PROJECT_ID: process.env.REACT_APP_BLOCKFROST_APP_PROJECT_ID,
},
// Even if you don't use internationalization, 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'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
editUrl: `${vars.repository}/edit/${vars.branch}`,
},
blog: {
showReadingTime: false,
routeBasePath: 'news',
blogSidebarCount: 50,
editUrl: `${vars.repository}/edit/${vars.branch}`,
},
theme: {
customCss: './src/css/custom.css',
},
gtag: {
// don't be evil
trackingID: 'GTM-5BC4HH7',
anonymizeIP: true,
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// The project's social card
image: 'img/og/default.jpg',
navbar: {
logo: {
alt: "Cardano Logo",
src: "img/cardano-logo-blue.svg",
srcDark: "img/cardano-logo-white.svg",
},
items: [
{
/*to: '/learn', TODO*/
label: 'Learn',
position: 'left',
items: [
{to: '/discover-cardano', label: 'Discover Cardano'},
{to: '/what-is-ada', label: 'What is ada?'},
{to: '/what-is-ada#wallets', label: 'Find Cardano wallets'},
{to: '/where-to-get-ada', label: 'Where to get ada?'},
{to: '/common-scams', label: 'How to protect your ada?'},
{to: '/stake-pool-delegation', label: 'Delegate your stake'},
{to: '/stake-pool-operation', label: 'Operate a stake pool'},
{to: '/governance', label: 'Participate in governance'},
{to: '/ouroboros', label: 'What is Ouroboros?'},
{to: '/hardforks', label: 'Which hard forks were there?'},
{to: '/genesis', label: 'About Genesis Distribution'},
{href: 'https://explorer.cardano.org', label: 'Explore the Cardano blockchain'},
],
},
{
/*to: '/community', TODO*/
label: 'Community',
position: 'left',
items: [
{to: '/community-code-of-conduct', label: 'Code of Conduct'},
{to: '/ambassadors', label: 'Cardano Ambassadors'},
{to: '/newsletter', label: 'Newsletter'},
{to: '/#follow', label: 'Follow Cardano'},
{href: 'https://forum.cardano.org', label: 'Cardano Forum'},
{href: 'https://forum.cardano.org/t/cardano-stay-safe-series-official-community-channel-list/20046', label: 'Social Channels'},
],
},
{
/* to: '/developers', TODO*/
label: 'Developers',
position: 'left',
items: [
{to: '/developers', label: 'Start building on Cardano'},
{to: '/research', label: 'Cardano Research'},
{to: '/exchanges', label: 'Integrate Cardano'},
],
},
{
to: '/use-cases',
label: 'Use Cases',
position: 'left',
items: [
{to: '/use-cases#identity', label: 'Identity'},
{to: '/use-cases#finance', label: 'Finance'},
{to: '/use-cases#supply-chain', label: 'Supply Chain'},
{to: '/use-cases#social-impact', label: 'Social Impact'},
{to: '/use-cases#data-technology', label: 'Data & Technology'},
{to: '/use-cases#diverse', label: 'Diverse Opportunities'},
],
},
/* we may want to hide this, and link it only via localhost link in the read me */
/*
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
*/
{
to: '/news', label: 'News', position: 'left',
items: [
{to: '/news', label: 'All Articles (Chronological)'},
{to: '/news/tags/community-digest', label: 'Community Digest'},
{to: '/news/tags/education', label: 'Education'},
{to: '/news/tags/development', label: 'Development'},
{to: '/news/tags/governance', label: 'Governance'},
{to: '/news/tags/scaling', label: 'Scaling'},
{to: '/news/tags', label: 'View Tags'},
],
},
{
href: `${vars.repository}`,
position: "right",
className: "header-github-link",
},
],
},
footer: {
style: 'dark',
links: [
/* we may want to hide this, and link it only via localhost link in the read me */
/*
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
*/
{
title: 'Entities',
items: [
{
label: 'Cardano Foundation',
to: '/entities?tab=cardanofoundation',
},
{
label: 'EMURGO',
to: '/entities?tab=emurgo',
},
{
label: 'Input Output',
href: '/entities?tab=iog',
},
{
label: 'Intersect',
href: '/entities?tab=intersect',
},
{
label: 'PRAGMA',
href: '/entities?tab=pragma',
},
{
label: 'More entities',
href: '/entities/#companies',
},
],
},
{
title: 'Support',
items: [
{
label: 'Brand Assets',
to: '/brand-assets',
},
{
label: 'Glossary',
to: '/docs/glossary#cardano-glossary',
},
{
label: 'Contact',
to: '/contact',
},
],
},
{
title: 'Legal',
items: [
{
label: 'Terms',
href: 'https://cardanofoundation.org/en/terms-and-conditions',
},
{
label: 'Privacy Policy',
href: 'https://cardanofoundation.org/en/privacy',
},
/* TODO: once we have these files, link locally not to the cf page
{
label: 'Terms',
to: '/terms-and-conditions',
},
{
label: 'Privacy Policy',
to: '/privacy-policy',
},
{
label: 'Cookie Policy',
to: '/cookie-policy',
},
*/
],
},
{
title: 'More',
items: [
{
label: 'Cardano News',
to: '/news',
},
{
label: 'Contribute',
to: '/docs/',
},
{
label: 'Contributors',
href: 'https://github.com/cardano-foundation/cardano-org/graphs/contributors',
}
],
},
],
copyright: `® Cardano`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
// Announcement Bar
// id: always change it when changing the announcement
// backgroundColor: use #1442B3 for announcements
announcementBar: isAnnouncementActive ?{
id: "announcement_index2", // Any value that will identify this message + increment the number every time to be unique
content:
`<strong>Calling all artists, designers, and creators to flex your creative muscles and reimagine the website header! ⭐️<a target="_blank" rel="noopener noreferrer" href="https://forum.cardano.org/t/call-for-artwork-design-the-new-cardano-org-header/139421?u=adatainment">$5,000 in prizes, sponsored by CF</a></strong>`,
backgroundColor: "#1442B3",
textColor: "#FFFFFF", // Use #FFFFFF
isCloseable: true, // Use true
}: undefined,
head: [
// ...
{
tagName: 'link',
attributes: {
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Chivo', // replace with your font URL
},
},
],
}),
// Custom JavaScript that will be injected into the <head> section of every page
scripts: [
{
src: '/scripts/deactivateServiceWorker.js',
async: true
}
],
};
export default config;