forked from celo-org/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocusaurus.config.js
230 lines (229 loc) · 6.23 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
/** @type {import('@docusaurus/types').DocusaurusConfig} */
const path = require("path");
const math = require("remark-math");
const katex = require("rehype-katex");
const { docs, developers } = require("./sidebars");
const DefaultLocale = "en";
module.exports = {
title: "Mento Protocol",
tagline: "Documentation for the Celo Platform",
url: "https://docs.celo.org",
baseUrl: "/",
trailingSlash: false,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/color-favicon.png",
organizationName: "celo-org", // Usually your GitHub org/user name.
projectName: "docs", // Usually your repo name.
i18n: {
defaultLocale: "en",
locales: ["en", "es"],
},
themes: ["@docusaurus/theme-live-codeblock"],
scripts: [
{
src: "https://cdnjs.cloudflare.com/ajax/libs/web3/1.6.0/web3.min.js",
async: true,
},
],
plugins: [
require.resolve("docusaurus-plugin-fathom"),
path.resolve(__dirname, "src/plugins/aliases.ts")
],
themeConfig: {
hideableSidebar: true,
prism: {
additionalLanguages: ["solidity"],
theme: require("prism-react-renderer/themes/dracula"),
},
colorMode: {
defaultMode: "dark",
},
navbar: {
title: "Mento Protocol",
logo: {
alt: "Mento Logo",
src: "img/color-logo.png",
},
items: [
// {
// "to": "welcome",
// "label": "Basics",
// "position": "left"
// },
{
to: "https://reserve.mento.org/",
label: "Reserve Stats",
position: "left",
},
{
to: "https://explorer.celo.org/stats",
label: "Assets Dashboard",
position: "left",
},
{
to: "https://roadmap.mento.org/",
label: "Roadmap",
position: "left",
},
{
href: "https://github.com/celo-org",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
algolia: {
appId: "55M4I38S60",
apiKey: "baed78b52be14ac907688f1dd70b41d5",
indexName: "celo",
contextualSearch: true,
debug: false,
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Home",
to: "/",
},
{
label: "Blog",
to: "/blog",
},
{
href: "https://celo.crowdin.com/celo-docs",
label: "Help translate",
},
{
label: "Docs GitHub",
href: "https://github.com/celo-org/docs",
},
],
},
{
title: "Community",
items: [
{
href: "/community/contributing",
label: "Contributors",
},
{
label: "Forum",
href: "https://forum.celo.org/",
},
{
label: "Discord",
href: "https://chat.celo.org",
},
{
label: "Twitter",
href: "https://twitter.com/CeloOrg",
},
{
label: "Reddit",
href: "https://www.reddit.com/r/celo/",
},
{
label: "Celo GitHub",
href: "https://github.com/celo-org",
},
],
},
{
title: "Ecosystem",
items: [
{
label: "Celo Foundation",
href: "https://celo.org",
},
{
label: "Medium Blog",
href: "https://medium.com/celoorg",
},
{
label: "The Celo",
href: "https://thecelo.com/",
},
{
label: "Celo Hub",
href: "https://celohub.org/",
},
{
label: "Careers",
href: "https://celo.org/jobs",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Celo Foundation, Inc. Built with Docusaurus.`,
},
fathomAnalytics: {
siteId: "AZMFWALB",
},
},
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: "https://github.com/celo-org/docs/edit/main/",
editUrl: ({ locale, versionDocsDirPath, docPath }) => {
// Link to Crowdin for French docs
if (locale !== DefaultLocale) {
return `https://celo.crowdin.com/celo-docs/${locale}`;
}
// Link to Github for English docs
return `https://github.com/celo-org/docs/edit/main/docs/${docPath}`;
},
routeBasePath: "/",
remarkPlugins: [
math,
[require("@docusaurus/remark-plugin-npm2yarn"), { sync: true }],
],
rehypePlugins: [katex],
},
gtag: {
// You can also use your "G-" Measurement ID here.
trackingID: "G-0CXEKQ81V2",
// Optional fields.
anonymizeIP: true, // Should IPs be anonymized?
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
blog: {
blogTitle: "Celo Blog",
blogSidebarTitle: "All posts",
blogSidebarCount: "ALL",
showReadingTime: true,
blogListComponent: require.resolve(
"./src/components/CustomBlogListPage.module.tsx"
),
readingTime: ({ content, frontMatter, defaultReadingTime }) =>
// allows per post reading time override in frontmatter
frontMatter.hide_reading_time
? undefined
: defaultReadingTime({
content,
options: { wordsPerMinute: 300 },
}),
},
},
],
],
stylesheets: [
{
href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
integrity:
"sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc",
crossorigin: "anonymous",
},
],
};