-
Notifications
You must be signed in to change notification settings - Fork 6
/
docusaurus.config.js
206 lines (201 loc) · 5.28 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
const math = require("remark-math");
const katex = require("rehype-katex");
require('dotenv').config();
const docusaurusConfig = {
plugins: [
"@docusaurus/theme-live-codeblock",
[
"docusaurus2-dotenv",
{
path: '.env',
safe: false,
systemvars: true,
},
],
[
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/docs/whitepapers/whitepaper', // string
from: '/docs/en/whitepaper', // string | string[]
},
{
to: '/docs/crowdloans/crowdloan-tanganika', // string
from: '/docs/en/crowdloans/crowdloan-tanganika', // string | string[]
},
],
},
],
],
title: "DataHighway Developer Hub",
tagline: "Complete develop documentation for the DataHighway DAO.",
customFields: {
users: [
{
caption: "User1",
image: "/img/Datahighway-Logo-big.png",
infoLink: "https://www.datahighway.com",
pinned: true,
},
],
baseUrlGithub: "https://github.com/DataHighway-DHX",
chatUrlDiscord: "https://discord.gg/UuZN2tE",
},
url: "https://dev.datahighway.com",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favicon.ico",
organizationName: "DataHighway-DHX", // Usually your GitHub org/user name.
projectName: "documentation", // Usually your repo name.
trailingSlash: false,
i18n: {
defaultLocale: "en",
locales: ["en", "de", "zh-CN", "zh-TW"],
},
themeConfig: {
/*
algolia: {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY,
indexName: 'datahighway',
},*/
liveCodeBlock: {
/**
* The position of the live playground, above or under the editor
* Possible values: "top" | "bottom"
*/
playgroundPosition: "bottom",
},
colorMode: {
// "light" | "dark"
defaultMode: "light",
// Hides the switch in the navbar
// Useful if you want to support a single color mode
disableSwitch: false,
// Should we use the prefers-color-scheme media-query,
// using user system preferences, instead of the hardcoded defaultMode
respectPrefersColorScheme: false,
},
navbar: {
title: "DataHighway Developer Hub",
logo: {
alt: "DataHighway Logo",
src: "img/favicon.ico",
},
items: [
// {
// type: "doc",
// docId: "intro",
// position: "left",
// label: "Docs & Tutorials",
// },
{
to: "docs/getting-started/users-purpose",
position: "left",
label: "Docs & Tutorials",
},
{
type: "localeDropdown",
position: "right",
},
{ to: "/blog", label: "Blog", position: "left" },
{
to: "docs/whitepapers/whitepaper",
position: "left",
label: "Whitepaper",
activeBasePath: "docs/whitepaper",
},
{
to: "docs/crowdloans/crowdloan-tanganika",
position: "left",
label: "Crowdloan Tanganika",
activeBasePath: "docs/crowdloans",
},
{
href: "https://github.com/DataHighway-DHX/documentation",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "light",
logo: {
alt: "datahighway logo",
src: "img/favicon.ico",
href: "https://www.datahighway.com",
},
links: [
{
title: "Docs",
items: [
{
label: "Getting Started",
to: "/docs/getting-started/users-purpose",
},
{
label: "Tutorials",
to: "/docs/tutorials/tutorials-accounts-create-account",
},
],
},
{
title: "Community",
items: [
{
label: "Discord",
href: "https://discord.gg/UuZN2tE",
},
{
label: "Twitter",
href: "https://twitter.com/datahighway_dhx",
},
],
},
{
title: "More",
items: [
{
label: "GitHub",
href: "https://github.com/DataHighway-DHX",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} DataHighway DAO`,
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/DataHighway-DHX/documentation/edit/master/",
remarkPlugins: [math],
rehypePlugins: [katex],
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
"https://github.com/DataHighway-DHX/documentation/edit/master/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
};
if (!process.env.DATAHIGHWAY_DOCS_DEV) {
docusaurusConfig.themeConfig.algolia = {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_KEY || 'demo-key',
indexName: 'datahighway',
}
}
module.exports = docusaurusConfig;