-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocusaurus.config.js
154 lines (149 loc) · 3.78 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
import {themes as prismThemes} from 'prism-react-renderer';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
export default {
title: 'Gear Academy',
tagline: 'A place to learn about Gear and how to use it.',
url: 'https://academy.gear.rs',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/favicon.ico',
organizationName: 'gear-foundation',
projectName: 'academy',
presets: [
[
'@docusaurus/preset-classic',
({
docs: {
path: './docs',
routeBasePath: '/',
sidebarPath: './sidebars.js',
editUrl: 'https://github.com/gear-foundation/academy/edit/master/',
showLastUpdateTime: true,
editLocalizedFiles: true,
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
lastVersion: 'current',
versions: {
current: {
label: 'Current',
badge: false,
},
next: {
path: 'next',
label: 'Next 🚧',
banner: 'unreleased',
badge: true,
},
},
},
blog: false,
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
({
navbar: {
title: 'Gear Academy',
logo: {
alt: 'Logo',
src: 'img/logo.svg',
srcDark: "img/logo-inverted.svg"
},
items: [
{
type: 'dropdown',
label: 'Courses',
position: 'left',
items: [
{
type: 'doc',
docId: 'scd/index',
label: 'Gear Smart Contract Developer',
},
{
type: 'html',
value: '<hr style="margin: 0.3rem 0;">',
},
// TODO: Uncomment when ready
// {
// type: 'doc',
// docId: 'starter/index',
// label: '🚧 Starter (in-progress)',
// },
{
type: 'doc',
docId: 'basic/index',
label: '🚧 Basic (in-progress)',
},
{
type: 'doc',
docId: 'intermediate/index',
label: '🚧 Intermediate (in-progress)',
},
],
},
{
type: 'docsVersionDropdown',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
{
href: 'https://github.com/gear-foundation/academy',
label: 'GitHub',
position: 'right',
},
],
},
docs: {
sidebar: {
hideable: true,
autoCollapseCategories: true,
},
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['rust', 'toml'],
},
algolia: {
appId: 'G9ZWUC4KDW',
apiKey: 'efc8d64eb799f47b90edfc19edd0a1a2',
indexName: 'academy-gear',
contextualSearch: true,
searchParameters: {},
searchPagePath: 'search',
},
}),
i18n: {
defaultLocale: 'en',
locales: ['en', 'es', 'zh-cn'],
localeConfigs: {
'en': {
label: 'English',
},
'es': {
label: 'Español'
},
'zh-cn': {
label: '简体中文'
}
}
},
stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
type: 'text/css',
integrity:
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],
};