-
Notifications
You must be signed in to change notification settings - Fork 7
/
docusaurus.config.js
235 lines (224 loc) · 6.58 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
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const math = require('remark-math');
const katex = require('rehype-katex');
const lightCodeTheme = require('prism-react-renderer/themes/github')
const darkCodeTheme = require('prism-react-renderer/themes/dracula')
const currentYear = new Date().getFullYear()
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Ronin Docs',
tagline: 'Stake and earn rewards on Ronin',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://docs.roninchain.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
organizationName: 'axieinfinity', // Usually your GitHub org/user name.
projectName: 'ronin-documentation', // Usually your repo name.
staticDirectories: ['static'],
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],
plugins: [
'docusaurus-plugin-sass',
['@docusaurus/plugin-client-redirects',
{
createRedirects(existingPath) {
if (existingPath.includes('/')) {
return [
'/docs' + existingPath
];
}
return undefined; // Return a falsy value: no redirect created
},
},]
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: '/',
remarkPlugins: [math],
rehypePlugins: [katex],
editUrl: `https://github.com/axieinfinity/ronin-documentation/edit/main`,
editLocalizedFiles: false,
editCurrentVersion: false,
showLastUpdateTime: true,
},
blog: {
path: 'blog',
blogTitle: 'Technical blog',
blogDescription: 'Learn about the latest updates on Ronin',
routeBasePath: 'blog',
blogSidebarTitle: 'Technical blog',
showReadingTime: true,
remarkPlugins: [math],
rehypePlugins: [katex],
},
theme: {
customCss: require.resolve('./src/css/custom.scss'),
},
gtag: {
trackingID: 'G-7XP0LK51BJ', // Measurement ID
anonymizeIP: false,
},
googleTagManager: {
containerId: 'GTM-PSV4LRD', // Tag ID from Google Tag Manager
},
googleAnalytics: {
trackingID: 'UA-150383258-4',
},
}),
],
],
stylesheets: [
{
href: '/katex/katex.min.css',
type: 'text/css',
},
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
metadata: [
// Global tags
{name: 'keywords', content: 'web3, dapp, ronin, axie, axs, ron'},
// Facebook meta tags
{name: 'og:url', content: 'https://docs.roninchain.com'},
{name: 'og:type', content: 'website'},
// {name: 'og:title', content: 'Ronin Documentation'},
// {name: 'og:description', content: 'Build web3 games with real, player-owned economies.'},
{name: 'og:image', content: '/img/thumbnail.png'},
// Twitter meta tags
{name: 'twitter:card', content: 'summary_large_image'},
{name: 'twitter:domain', content: 'docs.roninchain.com'},
{name: 'twitter:url', content: 'https://docs.roninchain.com'},
// {name: 'twitter:title', content: 'Ronin Documentation'},
// {name: 'twitter:description', content: 'Build web3 games with real, player-owned economies.'},
{name: 'twitter:image', content: '/img/thumbnail.png'},
],
algolia: {
appId: 'RXU5ZAVMCJ',
apiKey: '46141953dde60ffc0242ca8e0252dbe8',
indexName: 'roninchain',
},
docs: {
sidebar: {
hideable: false,
autoCollapseCategories: true,
},
},
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 5,
},
// announcementBar: {
// id: 'slashing',
// content:
// 'Slashing rules have been updated, see <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/ronin_network/status/1645664361799901185?s=46&t=YkUXw7V1JhDN_wzIX5WIUg">Twitter announcement</a>',
// backgroundColor: '#EEF9FD',
// textColor: '#091E42',
// isCloseable: false,
// },
navbar: {
title: 'Ronin',
logo: {
alt: 'Ronin logo',
src: 'img/logo.svg',
},
items: [
// Get started
{
label: 'Get started',
to: '/get-started',
},
// Basics
{
label: 'Basics',
to: 'basics',
},
{
label: 'Whitepaper',
to: '/basics/white-paper',
target: '_blank',
},
// Apps
{
label: 'dApps',
to: 'apps',
},
// Delegators
{
label: 'Delegators',
to: 'delegators',
},
// Validators
{
label: 'Validators',
to: 'validators',
},
// Bridge operators
{
label: 'Bridge operators',
to: 'bridge-operators',
},
// Blog
{
label: 'Blog',
to: 'blog',
position: 'right',
},
// Search
{
type: 'search',
position: 'right',
},
],
},
footer: {
style: 'light',
links: [
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/roninnetwork',
},
{
label: 'X',
href: 'https://twitter.com/ronin_network',
},
],
},
{
title: 'Links',
items: [
{
label: 'Ronin brand kit',
href: 'https://drive.google.com/drive/folders/1ZM0R6fd13IhvBpTFwOBebYZqmTxQNgJi',
},
{
label: 'Support',
to: 'https://support.roninchain.com/hc/en-us',
},
],
},
],
copyright: `© ${currentYear - 1} - ${currentYear} Sky Mavis`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
}
module.exports = config