forked from cardano-foundation/developer-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
253 lines (244 loc) · 7.36 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
// GitHub Settings
const vars = require('./variables')
// Docusaurus Config
module.exports = {
title: "Cardano Developer Portal",
tagline: "let's build better",
url: "https://developers.cardano.org",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "cardano-foundation",
projectName: "developer-portal",
customFields: {
repository: `${vars.repository}`,
branch: `${vars.branch}`,
},
themeConfig: {
// Docs Sidebar
hideableSidebar: true,
// Additional Language Syntax Highlighting
prism: {
additionalLanguages: ['csharp', 'php'],
},
// Dark / Light Mode
colorMode: {
disableSwitch: false,
// with true defaultMode is overridden by user system preferences.
respectPrefersColorScheme: true,
switchConfig: {
darkIcon: "🌙",
darkIconStyle: {
marginLeft: "2px",
},
lightIcon: "☀️",
lightIconStyle: {
marginLeft: "1px",
},
},
},
// Announcement Bar
// id: always change it when changing the announcement
// backgroundColor: use #FD7575 for warnings and #2AA18A for announcements
announcementBar: {
id: "support_se2", // Any value that will identify this message + increment the number every time to be unique
content:
`<strong>Join the Cardano Stack Exchange and get your questions answered today. ⭐️<a target="_blank" rel="noopener noreferrer" href="https://cardano.stackexchange.com">Join us!</a></strong>`,
backgroundColor: "#2AA18A",
textColor: "#FFFFFF", // Use #FFFFFF
isCloseable: true, // Use true
},
// 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-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: "tools",
label: "Tools",
position: "left",
},
{
to: "showcase",
label: "Showcase",
position: "left",
},
{
to: "docs/get-started/testnets-and-devnets",
label: "Testnets",
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: "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: "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>`,
},
gtag: {
// You can also use your "G-" Measurement ID here.
trackingID: 'GTM-5NM3NX4',
// Optional fields.
anonymizeIP: true, // Should IPs be anonymized?
},
},
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/',
},
],
},
],
],
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}`,
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
};