-
Notifications
You must be signed in to change notification settings - Fork 28
/
vocs.config.ts
80 lines (74 loc) · 2.06 KB
/
vocs.config.ts
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
import { defineConfig } from 'vocs'
const GITHUB_URL_PREFIX = "https://github.com/dipdup-io/stone-packaging/tree/master"
const replaceInFiles = (fileExt: string, replacements: [string, string][]) =>
(code: string, id: string) => {
if (!id.endsWith(`.${fileExt}`)) {
return null;
}
for (const rec of replacements.values()) {
code = code.replaceAll(rec[0], rec[1]);
}
return {
code,
map: null,
};
}
export default defineConfig({
title: 'Stone Packaging',
rootDir: 'docs',
sidebar: [
{
text: "Overview",
link: "/",
},
{
text: "Examples",
link: "/example",
},
{
text: 'Installation',
collapsed: true,
items: [
{ text: "From sources", link: "/install/sources" },
{ text: "Static binaries", link: "/install/binaries" },
{ text: "Docker images", link: "/install/docker" },
{ text: "Debian packages", link: "/install/debian" },
{ text: "Homebrew", link: "/install/homebrew" },
],
},
{
text: 'Usage',
collapsed: true,
items: [
{ text: "Generating execution artifacts", link: "/usage/execution" },
{ text: "Stone Prover configuration", link: "/usage/configuration" },
{ text: "Proving execution", link: "/usage/proving" },
{ text: "Verifying proof", link: "/usage/verifying" },
],
},
{
text: 'Advanced',
collapsed: true,
items: [
{ text: "Verifying Stone proof in Ethereum", link: "/advanced/ethereum" },
{ text: "Verifying Stone proof on Starknet", link: "/advanced/starknet" },
],
},
{
text: 'Stone Packaging Resources',
link: '/resourcers',
},
],
vite: {
plugins: [
{
name: "vite-plugin-rewrite-links", // Plugin name
enforce: "pre", // Run before default transformations
transform: replaceInFiles("md", [
["../../test_files/", `${GITHUB_URL_PREFIX}/test_files/`],
["../../e2e_test/", `${GITHUB_URL_PREFIX}/e2e_test/`],
])
}
]
}
});