-
Notifications
You must be signed in to change notification settings - Fork 1
/
docusaurus.config.js
332 lines (313 loc) · 9.16 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// include(./redocly-versions.m4)
const redocusaurusSpecs = require('./redocusaurus.specs.js');
// @ts-ignore
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'EOS Developer Documentation',
tagline: 'Documentation for Developing on EOS Blockchain',
url: 'https://docs.eosnetwork.com/',
baseUrl: '/',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
// image under statics directory
favicon: 'img/cropped-EOS-Network-Foundation-Site-Icon-1-150x150.png',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'eosnetwork', // Usually your GitHub org/user name.
projectName: 'developer-documentation', // Usually your repo name.
// Even if you don't use internalization, 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', 'zh', 'ko'],
path: 'i18n',
localeConfigs: {
en: {
label: 'English',
direction: 'ltr',
htmlLang: 'en-US',
calendar: 'gregory',
path: 'en',
},
zh: {
label: '中文 Chinese',
direction: 'ltr',
htmlLang: 'zh-CN',
calendar: 'gregory',
path: 'zh',
},
ko: {
label: '한국어 Korean',
direction: 'ltr',
htmlLang: 'ko-KR',
calendar: 'gregory',
path: 'ko',
},
},
},
presets: [
[
'classic',
({
docs: {
// id: 'docs', // omitted => default instance
lastVersion: 'current',
path: 'docs',
routeBasePath: 'docs',
sidebarPath: require.resolve('./src/docs-sidebars.js'),
versions: {
current: {
label: 'latest',
path: 'latest',
},
},
admonitions: {
tag: '> '
}
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
googleTagManager: {
containerId: 'GTM-T4SWD2V'
},
}),
],
[
'redocusaurus',
{
specs: redocusaurusSpecs,
// Theme Options for modifying how redoc renders them
theme: {
// Change with your site colors
primaryColor: '#1890ff',
},
},
],
],
plugins: [
require.resolve("docusaurus-plugin-image-zoom"),
[
'@docusaurus/plugin-content-docs',
{
id: 'evm',
path: 'evm',
routeBasePath: 'evm',
sidebarPath: require.resolve('./src/evm-sidebars.js'),
// sidebarCollapsed: false,
// ... other options
},
],
// [
// '@docusaurus/plugin-content-docs',
// {
// include: ['**/*.md', '**/*.mdx'],
// id: 'native',
// path: 'docs',
// routeBasePath: 'native',
// sidebarPath: require.resolve('./src/sidebars.js'),
// // ... other options
// },
// ],
[
'@docusaurus/plugin-content-docs',
{
id: 'apis',
path: 'apis',
routeBasePath: 'apis',
sidebarPath: require.resolve('./src/generic-sidebars.js'),
// ... other options
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'manuals',
path: 'manuals',
routeBasePath: 'manuals',
sidebarPath: require.resolve('./src/generic-sidebars.js'),
// ... other options
},
],
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/docs/latest/node-operation/migration-guides/v1-history-alternatives',
from: '/leapforward/',
},
{
to: '/evm/quick-start/introduction',
from: '/docs/latest/eos-evm/getting_started/',
},
{
to: '/evm/quick-start/introduction',
from: '/docs/latest/eos-evm/',
},
],
},
]
],
staticDirectories: [
"openapi",
"static"
],
// custom fields for nav bar
customFields: {
navbar: {
logo: {
alt: 'EOS Network',
src: 'img/eosn_logo_light.png',
},
items: [
],
},
main: {
wideCard: {
title: 'EOS EVM',
tagline:'A brand new home for EVM developers',
subtitle: `Migrate your apps to the world's fastest and cheapest EVM using tools and frameworks you're already familiar with.`,
buttonText:'MIGRATE NOW',
icon: '/icons/brief-case-icon.svg', //replace with required icon
href: '/evm/smart-contracts/migrate-your-smart-contract',
},
signUp: {
title: 'Sign up for developer alerts',
subtitle: `
Don't be caught with your pants down. Breaking changes will happen. If you want to stay on top of things when they do make sure to sign up for developer alerts emails.
`,
action: 'https://eosnetwork.us8.list-manage.com/subscribe/post',
buttonText: 'ALERT ME',
},
intakeForm: {
title: "Boost Your App's Success!",
subtitle: `
Submit your app to our ecosystem page and reach a wider audience, gain exposure, and attract new users to your already built application.
`,
action: 'https://eosnetwork.com/#ecosystem-intake',
buttonText: 'INTAKE FORM',
},
},
featureFlags: {
lang: true,
}
},
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
zoom: {
selector: '.markdown :not(em) > img',
config: {
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)'
}
}
},
navbar: {
logo: {
alt: 'EOS Network',
src: 'img/eosn_logo_light.png',
},
// keep this items array as is, this is used just to let docosaurus know that something is there
items: [
{
docId: 'native',
position: 'left',
label: 'Native',
to: '/docs/latest/quick-start/introduction',
},
{
docId: 'evm',
position: 'left',
label: 'EVM',
to: '/evm/quick-start/introduction',
},
{
docId: 'courses',
position: 'left',
label: 'Videos',
to: 'https://learn.eosnetwork.com/',
},
{
docId: 'eosnetwork',
position: 'left',
label: 'What is EOS?',
to: 'https://eosnetwork.com/',
},
{
type: 'localeDropdown',
position: 'right',
},
]
},
colorMode: {
disableSwitch: true,
},
algolia: {
// The application ID provided by Algolia
appId: 'XINC4ZXHCU',
// Public API key: it is safe to commit it
apiKey: 'f79cac8feb6c21d666ea50f725d69c0e',
indexName: 'eosnetwork',
// Optional: see doc section below
contextualSearch: true,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
externalUrlRegex: 'docs.eosnetwork.com',
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',
//... other Algolia params
},
docs: {
/* closes sibling categories when expanding a category */
sidebar: {
autoCollapseCategories: false,
hideable: false,
},
},
footer: {
style: 'dark',
logo: {
alt: 'EOS Network',
src: 'img/eosn_logo_white.svg',
srcDark: 'img/eosn_logo.svg',
},
links: [
{
title: 'Terms',
items: [
{
label: 'Terms & Conditions, Privacy',
href: 'https://eosnetwork.com/terms-and-conditions',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} EOS Network Foundation.`,
},
prism: {
theme: require('prism-react-renderer/themes/oceanicNext'),
additionalLanguages: ['solidity'],
// theme: lightCodeTheme,
// darkTheme: darkCodeTheme,
},
}),
scripts: [
{
src: 'https://kit.fontawesome.com/d47eba6dcd.js',
crossorigin: 'anonymous',
async: true,
}
],
stylesheets: [
"https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap"
],
};
module.exports = config;