Repository navigation
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
371 lines (362 loc) · 14.1 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
371 lines (362 loc) · 14.1 KB
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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Gnosis Chain",
tagline:
"Build apps, payments and infrastructure on Gnosis Chain: an EVM network with 5-second blocks, near-zero fees and a stablecoin as gas.",
url: "https://docs.gnosischain.com",
baseUrl: "/",
onBrokenLinks: "ignore",
onBrokenMarkdownLinks: "ignore",
favicon: "img/favicon.ico",
scripts: [
{
src: "/js/analytics-consent.js",
async: true,
},
],
// Inter is the canon Gnosis UI/body sans (typography.json). Kept all-sans per
// the docs' own type direction; no Playfair serif display face.
stylesheets: [
{
href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",
rel: "stylesheet",
},
],
customFields: {
POSTHOG_KEY: process.env.POSTHOG_KEY,
},
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "gnosischain", // Usually your GitHub org/user name.
projectName: "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"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: "docs",
editUrl: "https://github.com/gnosischain/documentation/tree/main",
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
showLastUpdateTime: true,
// Withdrawals and voluntary exit live in the Validators section; link them from
// Run a node > Management too, where node operators used to find them
async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) {
const items = await defaultSidebarItemsGenerator(args);
if (args.item.dirName !== "node") return items;
return items.map((item) =>
item.type === "category" && item.label === "Management"
? {
...item,
items: [
...item.items,
{ type: "ref", id: "validators/withdrawals/withdrawals", label: "Validator withdrawals" },
{ type: "ref", id: "validators/voluntary-exit", label: "Voluntary exit" },
],
}
: item,
);
},
},
// Updates blog archived to /archives/Updates (not published).
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.scss"),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/thumbnail.png",
announcementBar: {
id: "eez_launch_partner_q1_2027",
content:
'Gnosis Chain is becoming Gnosis EEZ. Deploy now, with no redeployment at the fork. <a href="/launch-partner">Become a launch partner</a>',
isCloseable: true,
},
colorMode: {
defaultMode: "light", // Light by default, per the Gnosis visual identity
disableSwitch: false, // Enable the theme switch
respectPrefersColorScheme: false, // Do not change theme based on user preference
},
docs: {
sidebar: {
// Sidebar always visible: no collapse control (also hidden in custom.scss).
hideable: false,
},
},
navbar: {
logo: {
alt: "Gnosis Chain",
// Canonical Gnosis Chain lockup: ink + Emerald 700 on light, paper + Fresh Green on dark
src: "img/brand/gnosis-chain-on-light.svg",
srcDark: "img/brand/gnosis-chain-on-dark.svg",
width: 176,
height: 26,
},
items: [
{
type: "docSidebar",
position: "left",
sidebarId: "eez",
label: "Gnosis EEZ",
},
// The Gnosis Chain doc set, one tab per section
{
type: "docSidebar",
position: "left",
sidebarId: "gnosisChain",
label: "Gnosis Chain",
},
{
type: "docSidebar",
position: "left",
sidebarId: "developerGuides",
label: "Developers",
},
{
type: "docSidebar",
position: "left",
sidebarId: "bridges",
label: "Bridges",
},
// Tools, technical guides, validators and FAQ, sectioned in its left sidebar
{
type: "docSidebar",
position: "left",
sidebarId: "knowledgeHub",
label: "Knowledge hub",
},
// No marketing CTA in the docs header: it is kept clean and functional so
// the docs read as a tool, not a second marketing page. The launch-partner
// call lives in the announcement bar. Faucet, Bridge and Ecosystem live in
// the left sidebars; the build/bridge sites are in the DOCS switcher.
],
},
footer: {
style: "dark",
links: [
{
title: "Gnosis EEZ",
items: [
{ label: "What is Gnosis EEZ", to: "/eez" },
{ label: "Now vs Gnosis EEZ", to: "/eez/gnosis-eez" },
{ label: "How it works", to: "/eez/how-it-works" },
{ label: "Timeline", to: "/eez/timeline" },
{ label: "Transition FAQ", to: "/eez/faq" },
{ label: "Become a launch partner", to: "/launch-partner" },
],
},
{
title: "Build",
items: [
{ label: "Deploy now", to: "/launch-partner/deploy-now" },
{ label: "0-1 guides", to: "/developers/guides" },
{ label: "Demo projects", to: "/category/demo-projects" },
{ label: "Useful contracts", to: "/developers/Usefulcontracts" },
{ label: "Tools", to: "/tools" },
],
},
{
title: "Network",
items: [
{ label: "Network details", to: "/about/networks/" },
{ label: "Chiado testnet", to: "/about/networks/chiado" },
{ label: "GNO and xDai", to: "/about/tokens" },
{ label: "Chain specs", to: "/about/specs" },
],
},
{
title: "Community",
items: [
{ label: "Discord", href: "https://discord.gg/gnosis" },
{ label: "Telegram", href: "https://t.me/gnosischain" },
{ label: "X", href: "https://twitter.com/gnosischain" },
{ label: "GitHub", href: "https://github.com/gnosischain" },
{ label: "Build", href: "https://www.gnosis.io/chain/build" },
],
},
{
title: "More",
items: [
{ label: "FAQ", to: "/faq/others" },
{ label: "Gnosisscan", href: "https://gnosisscan.io" },
{
label: "Gnosis Bridge app",
href: "https://bridge.gnosischain.com",
},
{ label: "Careers", href: "https://gnosis.io/careers/" },
{ label: "Media kit", href: "https://www.gnosis.io/press" },
{ label: "Terms of use", to: "/terms-conditions" },
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Gnosis.`,
},
algolia: {
appId: process.env.ALGOLIA_ID || "key",
apiKey: process.env.ALGOLIA_KEY || "key",
indexName: process.env.ALGOLIA_INDEX || "index",
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["solidity"], // all languages: https://prismjs.com/#supported-languages
},
metadata: [
{
name: "google-site-verification",
content: "P--3KGPeNoGjwcr2ZM1-m42FLjd8WL_Ly7XWTedX2U4",
},
{ name: "twitter:card", content: "summary_large_image" },
],
}),
// Fills the navbar pill once the page has scrolled
clientModules: [require.resolve("./src/clientModules/navbarScroll.js")],
plugins: [
[require.resolve("docusaurus-plugin-sass"), {}],
// The old developer overview now lands on the Developer guides overview. Both casings
// were linked (the file was Overview.md, links used /developers/overview). They differ
// only by case, so they are written here rather than by plugin-client-redirects: on a
// case-insensitive disk (macOS) both resolve to one file, and that plugin fails on the clash.
require("./redirects/case-insensitive-redirects")({
"/developers/Overview": "/developers",
"/developers/overview": "/developers",
}),
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
// Glossary moved from the Gnosis EEZ section into the Knowledge hub
{
to: "/knowledge-hub/glossary",
from: "/eez/glossary",
},
// Launch partner moved out of the Gnosis EEZ section to its own page
{
to: "/launch-partner",
from: "/eez/launch-partner",
},
// Updates blog archived to /archives/Updates; nothing under /updates is published
{
to: "/",
from: [
"/updates",
"/updates/20221210-merge",
"/updates/20221208-temporary-bootnodes",
"/updates/202212-bridges-pause",
// Every post, tag, page and archive URL the blog published on dev
...require("./redirects/archived-updates.json"),
],
},
// The Gnosisscan verification page was removed; the section index covers verification
{
to: "/developers/Verify Smart Contracts/",
from: "/developers/Verify Smart Contracts/gnosisscan",
},
// "About Gnosis Chain" is the Overview page of the Gnosis Chain section
{
to: "/about",
from: "/start/about-gnosis-chain",
},
// Validator withdrawals and voluntary exit moved to the Validators section
{
to: "/validators/withdrawals",
from: "/node/management/withdrawals",
},
...[
"bls-to-execution-change",
"claiming-your-gno",
"switch-to-compounding",
].map((page) => ({
to: `/validators/withdrawals/${page}`,
from: `/node/management/withdrawals/${page}`,
})),
{
to: "/validators/voluntary-exit",
from: "/node/management/voluntary-exit",
},
// Bridges FAQs merged into the master FAQ as its Bridging subsection
{
to: "/faq/others",
from: "/faq/bridges",
},
// Node FAQs and Validators FAQ archived to /archives/FAQ
{
to: "/faq/others",
from: [
"/faq/node",
"/faq/Node FAQs/changingwc",
"/faq/Node FAQs/depositWithdrawalReward",
"/faq/Node FAQs/generalQuestions",
"/faq/Node FAQs/monitoring",
"/faq/Node FAQs/offlineAndSyncIssue",
"/faq/Node FAQs/runningNode",
"/faq/Node FAQs/staking",
],
},
{
to: "/about/communication",
from: "/developers/communication",
},
// Optimism on Gnosis was deprecated in March 2023; page archived to /archives/Optimism
{
to: "/about/networks/",
from: "/about/networks/optimism",
},
// Truffle was sunset by Consensys in 2023; pages archived to /archives/Truffle
{
to: "/developers/dev-environment/hardhat",
from: "/developers/dev-environment/truffle",
},
{
to: "/developers/Verify Smart Contracts/",
from: "/developers/Verify Smart Contracts/truffle",
},
],
},
],
[
// Agent-readable output: llms.txt (index), llms-full.txt (all content) and a .md copy of
// every page, which the "Copy page" menu next to each doc title also uses.
require.resolve("./src/plugins/llms-txt.mjs"),
{
siteTitle: "Gnosis Chain Docs",
siteDescription:
"Documentation for Gnosis Chain and Gnosis EEZ. Gnosis Chain is an EVM network (chain ID 100) with 5-second blocks and xDai, a stablecoin, as gas. Gnosis EEZ is the first instance of the Ethereum Economic Zone: Gnosis Chain will be hard-forked onto it, with contracts, balances and addresses carried over unchanged.",
// One section per top-level folder; depth 2 gave every single page its own heading.
depth: 1,
optionalLinks: [
{ title: "EEZ protocol docs", url: "https://docs.eez.io/", description: "The Ethereum Economic Zone specification" },
{ title: "EEZ demos", url: "https://build.eez.io/", description: "Hands-on walkthroughs of a synchronous cross-chain call" },
],
// Same order as the navbar tabs: Gnosis EEZ first, since that is where an agent should begin.
includeOrder: ["/eez/**", "/launch-partner/**", "/about/**", "/developers/**", "/bridges/**", "/knowledge-hub", "/knowledge-hub/**", "/tools/**", "/technicalguides/**", "/validators/**", "/node/**", "/faq/**"],
content: {
enableLlmsFullTxt: true,
includePages: true,
// Sidebar category pages are only lists of links to pages already in the index.
includeGeneratedIndex: false,
// Full URLs, so every link resolves from wherever an agent read the file.
relativePaths: false,
excludeRoutes: ["/search", "/live-samples/**"],
},
},
],
],
};
module.exports = config;