-
Notifications
You must be signed in to change notification settings - Fork 522
/
docusaurus.config.js
185 lines (182 loc) · 4.88 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
import { themes } from 'prism-react-renderer'
import katex from 'rehype-katex'
import math from 'remark-math'
import webpack from 'webpack'
const darkCodeTheme = themes.dracula
const lightCodeTheme = themes.github
module.exports = {
title: 'Helium Documentation',
tagline: 'Documentation for the Helium Network',
url: 'https://docs.helium.com',
baseUrl: '/',
onBrokenLinks: 'throw',
favicon: 'img/favicon/favicon.ico',
organizationName: 'helium', // Usually your GitHub org/user name.
projectName: 'docs', // Usually your repo name.
themeConfig: {
docs: {
sidebar: {
hideable: true,
},
},
// hideableSidebar: true,
algolia: {
appId: 'XC618T80WL',
apiKey: '7d9c9bfed6c45d91cb148ac5a365079d',
indexName: 'helium',
contextualSearch: false,
},
colorMode: {
// "light" | "dark"
defaultMode: 'light',
// Hides the switch in the navbar
// Useful if you want to support a single color mode
disableSwitch: true,
// Should we use the prefers-color-scheme media-query,
// using user system preferences, instead of the hardcoded defaultMode
respectPrefersColorScheme: false,
},
navbar: {
title: '',
style: 'primary',
logo: {
alt: 'Helium Logo',
src: 'img/icons/logo_docs_black.svg',
srcDark: 'img/icons/logo_docs_white.svg',
},
items: [
{
to: 'tokens/hnt-token',
label: 'Tokens',
position: 'left',
},
{
to: 'wallets',
label: 'Wallets',
position: 'left',
},
{
to: 'iot',
label: 'IoT Network',
position: 'left',
},
{
to: 'mobile/5g-on-helium',
label: 'Mobile Network',
position: 'left',
},
// "more" dropdown for navbar
{
label: 'More',
position: 'left',
items: [
{ label: 'Network Architecture', to: 'solana' },
{ label: 'Community Governance', to: 'governance' },
{ label: 'Dev Blog', to: 'devblog' },
{
href: 'https://github.com/helium',
label: 'Helium GitHub',
},
],
},
],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} Helium Foundation`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['protobuf', 'rust', 'toml', 'bash'],
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
breadcrumbs: false,
sidebarPath: require.resolve('./sidebarsDocs.js'),
routeBasePath: '/',
// Please change this to your repo.
editUrl: 'https://github.com/helium/docs/edit/master',
remarkPlugins: [math],
rehypePlugins: [katex],
},
gtag: {
trackingID: 'G-85D2WJWZNL',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
stylesheets: [
{
href: 'https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap',
},
{
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
type: 'text/css',
integrity: 'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],
customFields: {
MIGRATION_SERVICE_URL: 'https://migration.web.helium.io',
SOLANA_URL: 'https://solana-rpc.web.helium.io/?session-key=Pluto',
TOKENS_TO_RENT_SERVICE_URL: 'https://tokens-to-rent.web.helium.io',
},
plugins: [
function (context, options) {
return {
name: 'webpack-plugin',
// eslint-disable-next-line
configureWebpack(config, isServer, utils) {
return {
plugins: [
new webpack.ProvidePlugin({
process: require.resolve('process/browser'),
}),
],
resolve: {
fallback: {
assert: false,
crypto: false,
stream: false,
},
},
}
},
}
},
// uncomment and repair for multiple blogs
// [
// '@docusaurus/plugin-content-blog',
// {
// id: 'blog',
// routeBasePath: 'blog',
// path: './blog',
// },
// ],
[
'@docusaurus/plugin-content-blog',
{
id: 'engineering-blog',
routeBasePath: 'devblog',
path: './devblog',
blogTitle: 'Helium Engineering Blog',
blogDescription: 'Helium Engineering Blog',
postsPerPage: 'ALL',
blogSidebarCount: 0,
authorsMapPath: 'authors.yaml',
},
],
],
markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid', 'docslab-docusaurus'],
}