-
Notifications
You must be signed in to change notification settings - Fork 25
/
docusaurus.config.js
366 lines (353 loc) · 15 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
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
require("dotenv").config();
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const { tailwindPlugin, webpackPlugin } = require("./src/plugins");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: " ", // Set empty string to disable site title repeating in og title for all pages. Title, descr, and home page heading set in src/pages/index.js.
tagline:
"Build with XMTP to send messages between blockchain accounts, including DMs, alerts, announcements, and more", // tagline on home page
titleDelimiter: " ", // Set empty string to disable pipe delimiter in og title
url: "https://xmtp.org",
customFields: {
githubAPI: process.env.PUBLIC_URL,
personalToken: process.env.AUTH_PERSONAL_TOKEN,
},
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/favi.png",
organizationName: "xmtp",
projectName: "xmtp-dot-org",
scripts: [
{
src: "https://widget.kapa.ai/kapa-widget.bundle.js",
"data-website-id": "7039ef02-1fe3-4e7a-9dfa-5421408b7cea",
"data-project-name": "XMTP",
"data-project-color": "#5A2895",
"data-project-logo":
"https://avatars.githubusercontent.com/u/82580170?s=280&v=4",
"data-modal-example-questions":
"How do I send a remote attachment?,Is XMTP Decentralized?, Do you have group chats?",
"data-button-position-bottom": "120px",
"data-button-hide": "true",
"data-modal-override-open-class": "ask_gpt",
"data-search-mode-default": "false",
"data-search-mode-enabled": "true",
"data-modal-title": "XMTP Docs",
async: true,
},
{
src: "/js/myjs.js",
},
{
src: "https://plausible.io/js/script.tagged-events.outbound-links.js",
async: true,
defer: true,
"data-domain": "xmtp.org",
},
{
src: "https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js",
"data-domain": "xmtp.org",
},
{
src: "https://unpkg.com/flickity-fade@1/flickity-fade.js",
"data-domain": "xmtp.org",
},
],
clientModules: [require.resolve("./src/css/tailwind.css")],
presets: [
[
"classic",
{
docs: {
path: "docs",
id: "default",
routeBasePath: "docs",
sidebarPath: require.resolve("./sidebars/sidebars.js"),
showLastUpdateAuthor: false,
showLastUpdateTime: true,
editUrl: "https://github.com/xmtp/xmtp-dot-org/edit/main",
},
blog: {
blogDescription:
"A blog about XMTP (Extensible Message Transport Protocol), the open protocol and network for secure messaging",
blogSidebarTitle: "All posts",
blogSidebarCount: "ALL",
editUrl: "https://github.com/xmtp/xmtp-dot-org/edit/main",
},
theme: {
customCss: require.resolve("./src/css/tailwind.css"),
},
},
],
],
plugins: [
tailwindPlugin,
// @ts-ignore
webpackPlugin,
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: "light",
disableSwitch: false,
},
image: "img/xmtp-new.jpeg",
navbar: {
title: "",
logo: {
className: "navbar__logo__img",
alt: "XMTP Logo",
src: "img/logomark.svg",
srcDark: "img/logomark-dark.svg",
},
items: [
{
to: 'https://docs.xmtp.org/',
position: 'right',
label: 'Documentation ↗',
},
{
type: "dropdown",
position: "right",
label: "Use cases",
items: [
{
href: "https://github.com/xmtp/awesome-xmtp/",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/xmtp-icon.svg" alt="XMTP icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Awesome XMTP ↗</div>`,
},
{
to: "/docs/use-cases/messaging",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/messaging-icon.svg" alt="Messaging icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Messaging</div></div>`,
},
{
to: "/docs/use-cases/deso",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/social-icon.svg" alt="Social icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Web3 social</div></div>`,
},
{
to: "/docs/use-cases/marketing",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/marketing-icon.svg" alt="Marketing icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Marketing</div></div>`,
},
{
to: "notifi-case-study",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/mic-icon.svg" alt="Broadcast icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Broadcast</div></div>`,
},
{
to: "/docs/use-cases/automation",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/chip-icon.svg" alt="Automation icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Automation</div></div>`,
},
{
to: "/docs/use-cases/support",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/support-icon.svg" alt="Automation icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Support</div></div>`,
},
{
to: "/docs/use-cases/commerce",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/commerce-icon.svg" alt="Automation icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Commerce</div></div>`,
},
{
to: "/docs/use-cases/defi",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/finance-icon.svg" alt="Finance icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">DeFi</div></div>`,
},
{
to: "/docs/use-cases/gaming",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/smile.svg" alt="Smile icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Gaming</div></div>`,
},
{
to: "/docs/use-cases/dao",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/finance-icon.svg" alt="Finance icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">DAOs</div></div>`,
},
{
to: "/docs/use-cases/groups",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/social-icon.svg" alt="Groups icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Groups</div></div>`,
},
{
to: "/docs/use-cases/frames",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/frames.svg" alt="Frames icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Frames</div></div>`,
},
],
},
{
type: "dropdown",
position: "right",
label: "Community",
items: [
{
href: "https://community.xmtp.org/",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/discourse-icon.svg" alt="Discourse icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Community forum ↗</div>`,
},
{
href: "https://converse.xyz/group-invite/a0XKzl9oVpWNXcuYDZLMf",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/chat.svg" alt="Chat icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Dev support & chat ↗</div>`,
},
{
href: "https://paragraph.xyz/@xmtp_community/",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/marketing-icon.svg" alt="Megaphone icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Blog ↗</div></div>`,
},
{
href: "https://calendar.google.com/calendar/u/0?cid=aGlAeG10cC5vcmc",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/calendar-icon.svg" alt="Calendar icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Events ↗</div>`,
},
{
to: "/docs/community/contribute",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/heart-icon.svg" alt="Heart icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Contribute</div>`,
},
{
to: "/docs/community/code-of-conduct",
html: `<div class="navbar__client__dropdown"><div class="navbar__client__dropdown__icon"><img src="/img/shield.svg" alt="Shield icon" /></div>
<div class="navbar__client__dropdown_text"><div class="text-base text-semibold">Code of conduct</div>`,
},
],
},
{
type: "html",
position: "right",
value:
'<button type="button" onClick="window.open(`https://app.converse.xyz/conversation`, `_blank`);" class="navbar__chatbutton"><strong>Try Converse</strong></button>',
},
{
href: "https://github.com/xmtp",
title: "Go to the XMTP GitHub repo",
position: "right",
className: "header-github-link",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Community",
items: [
{
label: "Community forum ↗",
to: "https://community.xmtp.org/",
},
{
label: "Dev support & chat ↗",
to: "https://converse.xyz/group-invite/a0XKzl9oVpWNXcuYDZLMf",
},
{
label: "Awesome XMTP ↗",
to: "https://github.com/xmtp/awesome-xmtp/",
},
{
label: "XMTP Community blog ↗",
to: "https://paragraph.xyz/@xmtp_community/",
},
{
label: "XMTP Dev Call calendar ↗",
to: "https://calendar.google.com/calendar/u/0/r?cid=aGlAeG10cC5vcmc",
},
{
label: "Contribute",
to: "/docs/community/contribute",
},
{
label: "Code of conduct",
to: "/docs/community/code-of-conduct",
},
],
},
{
title: "Resources",
items: [
{
label: "FAQ ↗",
to: "https://docs.xmtp.org/get-started/faq",
},
{
label: "Brand assets ↗",
to: "https://github.com/xmtp/brand",
},
{
label: "Status page ↗",
to: "https://status.xmtp.com/",
},
{
label: "Partnerships with Ephemera ↗",
to: "https://forms.gle/UMCFjB8ukiMxBxnK6",
},
{
label: "Careers at Ephemera ↗",
to: "https://paragraph.xyz/@ephemera/careers",
},
],
},
{
title: "Socials",
items: [
{
label: "Twitter / 𝕏 ↗",
to: "https://x.com/xmtp_",
},
{
label: "Farcaster ↗",
to: "https://warpcast.com/~/channel/xmtp",
},
],
},
{
title: "Site",
items: [
{
label: "Privacy policy",
to: "privacy",
},
{
label: "Terms of service",
href: "terms",
},
{
label: "CC BY 4.0 ↗",
to: "https://creativecommons.org/licenses/by/4.0/",
},
],
},
],
},
algolia: {
// The application ID provided by Algolia
appId: process.env.ALGOLIA_APP_ID,
// Public API key: it is safe to commit it
apiKey: process.env.ALGOLIA_API_KEY,
indexName: process.env.ALGOLIA_INDEX_NAME,
// Optional: see doc section below
contextualSearch: true,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
// externalUrlRegex: 'external\\.com|domain\\.com',
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",
//... other Algolia params
},
prism: {
additionalLanguages: ["swift", "kotlin", "graphql"],
theme: darkCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;