-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus.config.ts
More file actions
318 lines (305 loc) · 9.14 KB
/
Copy pathdocusaurus.config.ts
File metadata and controls
318 lines (305 loc) · 9.14 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
import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const config: Config = {
title: "XPHERE v2.0 Docs",
tagline: "Welcome to XPHERE",
favicon: "img/favicon.ico",
// Set the production url of your site here
url: "https://docs.x-phere.com",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
// GitHub pages deployment config.
organizationName: "xpherechain",
projectName: "docs.x-phere.com",
onBrokenLinks: "throw",
markdown: {
hooks: {
// Moved out of the deprecated top-level `onBrokenMarkdownLinks`, which
// Docusaurus v4 removes.
onBrokenMarkdownLinks: "warn",
},
},
// `trailingSlash` is deliberately left unset. Index pages (`/nodes`) need
// directory semantics for their relative links while leaf pages
// (`/references/json-rpc`) need the opposite, and only the default handles
// both. The redirect this used to cause on every internal link is fixed in
// firebase.json instead.
// Even if you don't use internationalization, 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",
{
docs: {
routeBasePath: "/", // Serve the docs at the site's root
sidebarPath: "./sidebars.ts",
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
editUrl:
"https://github.com/xpherechain/docs.x-phere.com/tree/main/",
// Show the last updated date on each doc page (derived from git history)
showLastUpdateTime: true,
},
theme: {
customCss: "./src/css/custom.css",
},
gtag: {
trackingID: "G-25VV0Q5M3G",
anonymizeIP: true,
},
} satisfies Preset.Options,
],
],
themes: [
"docusaurus-theme-openapi-docs", // export theme components
[
// Search runs entirely from a prebuilt index served with the site. No
// third-party service, so nothing to key, rate limit, or take down the
// search box when it expires.
"@easyops-cn/docusaurus-search-local",
{
hashed: true, // index filename carries a content hash, so it caches safely
indexBlog: false, // no blog on this site
docsRouteBasePath: "/", // docs are served at the root
highlightSearchTermsOnTargetPage: true,
searchResultLimits: 8,
searchBarShortcutHint: false,
},
],
],
headTags: [
// Structured data. Without it search engines infer the publisher and the
// site search endpoint from the page text, which is how documentation ends
// up attributed to the wrong organisation in results.
{
tagName: "script",
attributes: { type: "application/ld+json" },
innerHTML: JSON.stringify({
"@context": "https://schema.org",
"@type": "Organization",
name: "XPHERE Foundation",
url: "https://x-phere.com",
logo: "https://docs.x-phere.com/img/gnb_logo.png",
sameAs: [
"https://github.com/xpherechain",
"https://x.com/Xphere_official",
"https://medium.com/@Xphere_official",
],
}),
},
{
tagName: "script",
attributes: { type: "application/ld+json" },
innerHTML: JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
name: "XPHERE Documentation",
url: "https://docs.x-phere.com",
inLanguage: "en",
publisher: {
"@type": "Organization",
name: "XPHERE Foundation",
},
}),
},
],
themeConfig: {
metadata: [
{ property: "og:title", content: "XPHERE Documentation" },
{
property: "og:description",
content:
"Official documentation for XPHERE — an EVM-compatible Layer 1 with a dual-chain PBFT and xpHash architecture.",
},
{ property: "og:url", content: "https://docs.x-phere.com" },
{ property: "og:type", content: "website" },
{ property: "og:site_name", content: "XPHERE Documentation" },
],
colorMode: {
defaultMode: "dark",
disableSwitch: false,
// Ignore the visitor's OS theme so the site always opens in dark mode.
respectPrefersColorScheme: false,
},
// Social card used for link previews.
image: "img/xphere-social-card.png",
navbar: {
title: "XPHERE",
logo: {
alt: "XPHERE",
src: "img/gnb_logo.png",
},
items: [
// Grouped by what a reader is trying to do, so the bar stays short.
{
type: "dropdown",
label: "Build",
position: "left",
items: [
{ to: "/developers/quickstart", label: "Developer Guide" },
{ to: "/references", label: "References & RPC" },
{ to: "/faucet", label: "Testnet Faucet" },
],
},
{
type: "dropdown",
label: "Participate",
position: "left",
items: [
{ to: "/staking/overview", label: "Staking (Union Vault)" },
{ to: "/mining", label: "Mining" },
{ to: "/nodes", label: "Run a Node" },
{ to: "/union", label: "Union Membership" },
],
},
{
type: "dropdown",
label: "Ecosystem",
position: "left",
items: [
{ to: "/ecosystem/grants", label: "Grant Program" },
{ to: "/ecosystem/directory", label: "Ecosystem Directory" },
],
},
{
type: "dropdown",
label: "Resources",
position: "left",
items: [
{ to: "/resources/faq", label: "FAQ" },
{ to: "/resources/glossary", label: "Glossary" },
{ to: "/resources/tokenomics", label: "Tokenomics" },
{ to: "/resources/security", label: "Security" },
{ to: "/resources/network-upgrades", label: "Network Upgrades" },
{ to: "/resources/governance", label: "Governance" },
],
},
{
to: "/whitepaper",
label: "Whitepaper",
position: "right",
},
{
href: "https://github.com/xpherechain",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Community",
items: [
{
label: "telegram",
href: "https://t.me/Xphere_official",
},
{
label: "Discord",
href: "https://discord.gg/xphere",
},
{
label: "X",
href: "https://x.com/Xphere_official",
},
],
},
{
title: "Build",
items: [
{
label: "Developer Guide",
href: "/developers/quickstart",
},
{
label: "References & RPC",
href: "/references",
},
{
label: "Testnet Faucet",
href: "/faucet",
},
{
label: "Grant Program",
href: "/ecosystem/grants",
},
],
},
{
title: "Participate",
items: [
{
label: "Staking",
href: "/staking/overview",
},
{
label: "Mining",
href: "/mining",
},
{
label: "Run a Node",
href: "/nodes",
},
{
label: "Union Membership",
href: "/union",
},
],
},
{
title: "Learn",
items: [
{
label: "Whitepaper",
href: "/whitepaper",
},
{
label: "FAQ",
href: "/resources/faq",
},
{
label: "Tokenomics",
href: "/resources/tokenomics",
},
{
label: "Security",
href: "/resources/security",
},
],
},
{
title: "More",
items: [
{
label: "Staking Portal",
href: "https://stake.x-phere.com",
},
{
label: "XPScan Explorer",
href: "https://xpscan.io",
},
{
label: "GitHub",
href: "https://github.com/xpherechain",
},
],
},
],
copyright: `Ⓒ${new Date().getFullYear()} XPHERE Foundation. All rights reserved.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};
export default config;