-
Notifications
You must be signed in to change notification settings - Fork 0
/
docusaurus.config.js
226 lines (215 loc) · 8.19 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
// @ts-check
/* eslint-disable @typescript-eslint/no-var-requires */
// @TODO - make our own themes, i guess
const darkCodeTheme = require('prism-react-renderer').themes.dracula
const lightCodeTheme = require('prism-react-renderer').themes.github
function getUrl() {
return process.env.URL || 'http://localhost:3000'
}
function getBaseUrl() {
return process.env.BASE_URL || '/'
}
function isStaging() {
return process.env.STAGING === 'true'
}
const metaDescription =
'Learn to use a privacy-first social protocol, which seamlessly combines various identity standards and forms a private but verifiable social graph.'
/** @type {import('@docusaurus/types').Config} */
module.exports = {
/** Meta information */
title: 'Rarimo Docs',
tagline: metaDescription,
url: getUrl(),
baseUrl: getBaseUrl(),
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/logo-icon.png',
noIndex: isStaging(),
trailingSlash: true,
customFields: {
whitepaperUrl: 'https://docs.rarimo.com/files/Rarimo_whitepaper_v3.pdf',
},
organizationName: 'rarimo',
projectName: 'docs',
/** Localization */
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
/** Presets https://docusaurus.io/docs/using-plugins#using-presets */
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'docs',
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
breadcrumbs: false,
showLastUpdateTime: true,
editUrl: 'https://github.com/rarimo/docs/blob/main',
remarkPlugins: [
[require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }],
],
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
gtag: {
trackingID: 'G-PVC393K31J',
},
}),
],
],
/** Themes https://docusaurus.io/docs/using-plugins#using-themes */
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
logo: {
alt: 'Rarimo Logo',
src: 'img/logo-black.svg',
srcDark: 'img/logo-white.svg',
},
items: [
{
href: 'https://discord.gg/cfrH3Fe7ke',
html: `
<span class="header__social-link">
Discord <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <mask id="mask0_1217_16813" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="currentColor"/></mask><g mask="url(#mask0_1217_16813)"><path d="M5.33329 15L4.16663 13.8333L12.1666 5.83329H4.99996V4.16663H15V14.1666H13.3333V6.99996L5.33329 15Z" fill="currentColor"/></g></svg>
</span>`,
position: 'right',
},
{
href: 'https://github.com/rarimo',
html: `
<span class="header__social-link">
GitHub <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <mask id="mask0_1217_16813" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="currentColor"/></mask><g mask="url(#mask0_1217_16813)"><path d="M5.33329 15L4.16663 13.8333L12.1666 5.83329H4.99996V4.16663H15V14.1666H13.3333V6.99996L5.33329 15Z" fill="currentColor"/></g></svg>
</span>`,
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
items: [
{
html: `
<img class="footer__logo" src="/img/logo-white.svg" alt="Rarimo Logo"/>
<img class="footer__logo footer__logo--black" src="/img/logo-black.svg" alt="Rarimo Logo"/>
`,
},
{
html: `
<span style="color: var(--primary-text-color)">© ${new Date().getFullYear()}</span>
`,
},
],
},
{
items: [
{
html: `
<span style="font-weight: 500">Learn about Rarimo</span>`,
},
{
html: `
<a href="/" class="footer__social-link">Overview</a>`,
},
{
html: `
<a href="/zk-registry/" class="footer__social-link">ZK Registry</a>`,
},
{
html: `
<a href="/zk-passport/" class="footer__social-link">ZK Passport</a>`,
},
{
html: `
<a href="/zk-reputation/" class="footer__social-link">ZK Reputation</a>`,
},
],
},
{
items: [
{
html: `
<span style="font-weight: 500">Get in touch</span>`,
},
{
html: `
<a href="https://discord.gg/cfrH3Fe7ke" class="footer__social-link" target="_blank" rel="nofollow noreferrer noopener" aria-label="Discord">
Discord <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_1217_16813" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="currentColor"/></mask><g mask="url(#mask0_1217_16813)"><path d="M5.33329 15L4.16663 13.8333L12.1666 5.83329H4.99996V4.16663H15V14.1666H13.3333V6.99996L5.33329 15Z" fill="currentColor"/></g></svg>
</a>
`,
},
{
html: `
<a href="https://t.me/rarimoprotocol" class="footer__social-link" target="_blank" rel="nofollow noreferrer noopener" aria-label="Telegram">
Telegram <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <mask id="mask0_1217_16813" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="currentColor"/></mask><g mask="url(#mask0_1217_16813)"><path d="M5.33329 15L4.16663 13.8333L12.1666 5.83329H4.99996V4.16663H15V14.1666H13.3333V6.99996L5.33329 15Z" fill="currentColor"/></g></svg>
</a>
`,
},
{
html: `
<a href="https://twitter.com/Rarimo_protocol" class="footer__social-link" target="_blank" rel="nofollow noreferrer noopener" aria-label="X">
X <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <mask id="mask0_1217_16813" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="currentColor"/></mask><g mask="url(#mask0_1217_16813)"><path d="M5.33329 15L4.16663 13.8333L12.1666 5.83329H4.99996V4.16663H15V14.1666H13.3333V6.99996L5.33329 15Z" fill="currentColor"/></g></svg>
</a>
`,
},
],
},
],
},
algolia: {
apiKey: '18092da45b925ef9b6428ca707da2165',
indexName: 'rarimo',
appId: '4PAZA7JWOP',
contextualSearch: false,
searchPagePath: "search",
debug: true,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
defaultLanguage: 'javascript',
additionalLangauges: ['json', 'shell', 'solidity'],
},
metadata: [
{
property: 'og:image',
content: 'https://docs.rarimo.com/img/og-img.jpg',
},
{
name: 'twitter:card',
content: 'summary_large_image',
},
{
property: 'og:locale',
content: 'en_GB',
},
{
property: 'og:type',
content: 'website',
},
],
}),
/** Plugins https://docusaurus.io/docs/using-plugins */
plugins: [
[
require.resolve('@docusaurus/plugin-ideal-image'),
{
max: 1920,
min: 720,
steps: 3,
disableInDev: false,
},
],
],
}