Repository navigation
Expand file tree
/
Copy pathdocusaurus.config.js
More file actions
442 lines (432 loc) · 13.9 KB
/
Copy pathdocusaurus.config.js
File metadata and controls
442 lines (432 loc) · 13.9 KB
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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require("prism-react-renderer").themes.github;
const darkCodeTheme = require("prism-react-renderer").themes.vsDark;
const rehypeKatex = require("rehype-katex").default; // Extract default export for rehype-katex
const remarkMath = require("remark-math").default; // Extract default export for remark-math
const rehypeImageDimensions = require("./plugins/rehype-image-dimensions");
const { computeAwardedTotal } = require("./plugins/winners-data");
// Total $ awarded, summed from the winners page's money headings at config
// load — keeps the tagline/meta descriptions in sync with docs/15_winners.md.
const AWARDED = computeAwardedTotal(__dirname).total.toLocaleString("en-US");
// Sitewide structured data. Injected via headTags (below) so it is present in
// the server-rendered static HTML — react-helmet (<Head>) drops <script>
// children from SSR output, which is why prior on-page JSON-LD was invisible
// to non-JS crawlers.
const SITE_URL = "https://scrollprize.org/";
const orgJsonLd = {
"@context": "https://schema.org",
"@type": "Organization",
name: "Vesuvius Challenge",
alternateName: "Scroll Prize",
url: SITE_URL,
logo: SITE_URL + "img/social/opengraph.jpg",
description:
`Vesuvius Challenge is a machine learning, computer vision, and geometry competition reading the carbonized Herculaneum scrolls — papyri buried by the eruption of Mount Vesuvius in 79 AD — using X-ray CT scanning and AI. Over $${AWARDED} in prizes has been awarded.`,
foundingDate: "2023",
founder: [
{ "@type": "Person", name: "Nat Friedman" },
{ "@type": "Person", name: "Daniel Gross" },
{ "@type": "Person", name: "Brent Seales" },
],
employee: {
"@type": "Person",
name: "Giorgio Angelotti",
jobTitle: "Project Lead",
},
sameAs: [
"https://en.wikipedia.org/wiki/Vesuvius_Challenge",
"https://x.com/scrollprize",
"https://github.com/ScrollPrize",
"https://scrollprize.substack.com",
"https://www.youtube.com/@scrollprize",
],
};
const webSiteJsonLd = {
"@context": "https://schema.org",
"@type": "WebSite",
name: "Vesuvius Challenge",
url: SITE_URL,
publisher: { "@type": "Organization", name: "Vesuvius Challenge" },
};
// The sitemap's per-page <lastmod> is derived from git history. Some build
// environments have no git repository available — notably Vercel monorepo
// subdir builds, which run in a copied directory with no .git — and there the
// git lookup throws and aborts the whole build. Detect git up-front and only
// enable lastmod when it's actually available; otherwise omit it (the prior
// behavior) so the build always succeeds.
function gitLastmodSupported() {
try {
require("child_process").execSync("git rev-parse --is-inside-work-tree", {
cwd: __dirname,
stdio: "ignore",
});
return true;
} catch (e) {
return false;
}
}
const SITEMAP_LASTMOD = gitLastmodSupported() ? "date" : null;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Vesuvius Challenge",
tagline: `A machine learning and computer vision competition with $${AWARDED} awarded in prizes`,
url: "https://scrollprize.org",
baseUrl: "/",
onBrokenAnchors: "throw",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
favicon: "img/social/favicon.ico",
customFields: {
// "Ask the Scrolls" chat endpoint. Same-origin Vercel function in prod;
// point CHAT_ENDPOINT at a local dev shim (scripts/devChatServer.mjs) when
// testing against `yarn serve`. Empty string disables the widget.
chatEndpoint:
process.env.CHAT_ENDPOINT !== undefined
? process.env.CHAT_ENDPOINT
: "/api/chat",
},
scripts: [
{
src: "https://cdn.usefathom.com/script.js",
"data-site": "XERDEBQR",
defer: true,
"data-spa": "auto",
},
],
headTags: [
{
tagName: "meta",
attributes: { name: "theme-color", content: "#000000" },
},
{
tagName: "link",
attributes: { rel: "apple-touch-icon", href: "/apple-touch-icon.png" },
},
{
tagName: "link",
attributes: { rel: "manifest", href: "/manifest.json" },
},
{
tagName: "script",
attributes: { type: "application/ld+json" },
innerHTML: JSON.stringify(orgJsonLd),
},
{
tagName: "script",
attributes: { type: "application/ld+json" },
innerHTML: JSON.stringify(webSiteJsonLd),
},
],
clientModules: [
require.resolve("./src/clientModules/imageZoom.js"),
require.resolve("./src/clientModules/gtagSafeStub.js"),
require.resolve("./src/clientModules/anchorScrollFix.js"),
],
markdown: {
mermaid: true,
},
themes: ["@docusaurus/theme-mermaid"],
i18n: {
defaultLocale: "en",
locales: ["en"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
sidebarCollapsible: true,
breadcrumbs: false,
remarkPlugins: [remarkMath],
rehypePlugins: [[rehypeKatex, { strict: false }], rehypeImageDimensions],
},
blog: false,
theme: {
customCss: [
require.resolve("./src/css/tokens.css"),
require.resolve("./src/css/utilities.css"),
require.resolve("./src/css/custom.css"),
require.resolve("./src/css/chrome.css"),
require.resolve("./src/css/landing.css"),
require.resolve("./src/css/getstarted.css"),
require.resolve("./src/css/imageZoom.css"),
require.resolve("./src/css/chat.css"),
],
},
gtag: {
trackingID: "G-NLQQENBL0L",
anonymizeIP: false,
},
sitemap: {
lastmod: SITEMAP_LASTMOD,
changefreq: null,
priority: null,
filename: 'sitemap.xml',
ignorePatterns: [],
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: "Vesuvius Challenge",
logo: {
alt: "Vesuvius Challenge Logo",
src: "img/social/favicon-64x64.png",
},
items: [
{ to: "/prizes", label: "Prizes", position: "left" },
{ to: "/2026_open_problems", label: "Problems", position: "left" },
{
type: "dropdown",
label: "Tutorials & In-depth",
position: "left",
items: [
{
to: "/tutorial_VC3D",
label: "Virtual Unwrapping",
},
{
to: "/tutorial_spiral",
label: "Spiral Fitting",
},
{
to: "/open_problems/winding_annotations",
label: "Winding Constraints",
},
{
to: "/tutorial5",
label: "Ink Detection",
},
],
},
// docSidebar items stay highlighted on every page of their sidebar.
{ type: "docSidebar", sidebarId: "dataSidebar", label: "Data", position: "left" },
{ type: "docSidebar", sidebarId: "milestonesSidebar", label: "Milestones", position: "left" },
{
type: "dropdown",
label: "Community",
position: "left",
items: [
{ label: "Discord", href: "https://discord.gg/V4fJhvtaQn" },
{ label: "𝕏", href: "https://x.com/scrollprize" },
{ label: "Substack", href: "https://scrollprize.substack.com" },
{ label: "GitHub", href: "https://github.com/ScrollPrize" },
{
label: "Hugging Face",
href: "https://huggingface.co/scrollprize",
},
{
label: "Weights & Biases",
href: "https://wandb.ai/vesuvius-challenge/projects",
},
],
},
{ to: "/press", label: "Press", position: "left" },
{
href: "https://donate.stripe.com/aEUg101vt9eN8gM144",
label: "Donate",
position: "left",
},
{
href: "https://discord.gg/V4fJhvtaQn",
label: "Join Discord",
position: "right",
className: "vc-navbar-discord",
},
{
to: "/get_started",
label: "Get Started",
position: "right",
className: "vc-navbar-cta",
},
],
},
footer: {
style: "dark",
links: [
{
items: [
{
label: "Discord",
href: "https://discord.gg/V4fJhvtaQn",
},
{
label: "GitHub",
href: "https://github.com/ScrollPrize",
},
{
label: "Hugging Face",
href: "https://huggingface.co/scrollprize",
},
{
label: "Weights & Biases",
href: "https://wandb.ai/vesuvius-challenge/projects",
},
{
label: "Substack",
href: "https://scrollprize.substack.com",
},
{
label: "𝕏",
href: "https://x.com/scrollprize",
},
{
label: "Jobs",
to: "/jobs",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Vesuvius Challenge · Content licensed CC BY-NC 4.0 unless otherwise specified`,
},
image: '/img/social/opengraph.jpg',
metadata: [
{
name: "description",
content: `A machine learning and computer vision competition with $${AWARDED} awarded in prizes`,
},
{
property: "og:type",
content: "website",
},
{
property: "og:url",
content: "https://scrollprize.org/",
},
{
property: "og:title",
content: "Vesuvius Challenge",
},
{
property: "og:description",
content: "A machine learning & computer vision competition.",
},
{
property: "og:image",
content: "https://scrollprize.org/img/social/opengraph.jpg",
},
{
property: "twitter:card",
content: "summary_large_image",
},
{
property: "twitter:url",
content: "https://scrollprize.org/",
},
{
property: "twitter:title",
content: "Vesuvius Challenge",
},
{
property: "twitter:description",
content: "A machine learning & computer vision competition.",
},
{
property: "twitter:image",
content: "https://scrollprize.org/img/social/opengraph.jpg",
},
],
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
colorMode: {
defaultMode: "dark",
disableSwitch: true,
respectPrefersColorScheme: false,
},
}),
plugins: [
async function myPlugin(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(require("tailwindcss"));
if (process.env.NODE_ENV !== "development") {
postcssOptions.plugins.push(require("autoprefixer"));
}
return postcssOptions;
},
};
},
'./plugins/fetch-substack-posts',
'./plugins/atlas-data',
'./plugins/prizes-data',
'./plugins/winners-data',
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
to: "https://donate.stripe.com/aEUg101vt9eN8gM144",
from: "/donate",
},
{
to: "/villa_model",
from: "/lego",
},
{
to: "/unwrapping",
from: "/unrolling",
},
{
to: "https://dl.ash2txt.org/LICENSE.txt",
from: "/license",
},
// Orphan docs removed in the "Obsidian Minimal" restyle. Journals and
// Discord threads have linked these for years — keep the URLs alive.
{
to: "/segmentation",
from: "/tutorial_thaumato",
},
{
to: "/segmentation",
from: "/tutorial4",
},
{
to: "/unwrapping",
from: "/open_problem_rep",
},
// The open_problems/ink_detection page was retired (superseded by
// the Ink recovery section of Problems in-depth + the ink
// tutorial) — keep the URL alive.
{
to: "/tutorial5",
from: "/open_problems/ink_detection",
},
// Pages retired in the C6 fix round — keep the URLs alive.
{
to: "/data",
from: "/data_segments",
},
{
to: "/data",
from: "/data_fragments",
},
{
to: "/",
from: "/background",
},
// The blogpost briefly lived at /from_ash_to_text and /tech_blogpost
// on preview builds.
{
to: "/2026_open_problems",
from: "/from_ash_to_text",
},
{
to: "/2026_open_problems",
from: "/tech_blogpost",
},
],
},
],
],
};
module.exports = config;