Skip to content

Commit 0ca1a6d

Browse files
committed
struct
1 parent 0c28f65 commit 0ca1a6d

File tree

1 file changed

+178
-153
lines changed

1 file changed

+178
-153
lines changed

.vitepress/config.mts

Lines changed: 178 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,188 @@
11
import { defineConfig } from 'vitepress'
2+
23
export default defineConfig({
3-
head: [
4-
['link', { rel: 'icon', href: '/favicon.ico' }],
5-
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
6-
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
7-
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap' }],
8-
// ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap' }],
9-
['link', { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Imbue:opsz,wght@10..100,100..900&display=swap" }],
10-
['link', { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100..700&family=Roboto:wght@100&display=swap" }],
4+
head: [
5+
['link', { rel: 'icon', href: '/favicon.ico' }],
6+
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
7+
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
8+
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap' }],
9+
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Imbue:opsz,wght@10..100,100..900&display=swap' }],
10+
['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100..700&family=Roboto:wght@100&display=swap' }],
11+
],
12+
title: 'Xian Network',
13+
description: 'The documentation for the Xian Blockchain',
14+
themeConfig: {
15+
logo: '/xian-black.svg',
16+
17+
// Top navbar: quick entry points into each pillar (linking to existing pages)
18+
nav: [
19+
{ text: 'Home', link: '/' },
20+
{ text: 'Build', link: '/tutorials/creating-a-token' },
21+
{ text: 'How-to', link: '/contracts/submitting-a-contract' },
22+
{ text: 'Reference', link: '/contracts/context' },
23+
{ text: 'Concepts', link: '/contracts/concepts/model' },
24+
{ text: 'Operate', link: '/node/running-a-node' },
25+
{ text: 'SDKs', link: '/tools/xian-js' },
26+
{ text: 'Token & Governance', link: '/coin/economics' }
1127
],
12-
title: "Xian Network",
13-
description: "The documentation for the Xian Blockchain",
14-
themeConfig: {
15-
logo: '/xian-black.svg',
16-
nav: [
17-
{ text: 'Home', link: '/' },
18-
],
1928

20-
sidebar: [{
21-
text: 'Introduction to Xian',
22-
link: '/introduction/',
29+
// Sidebar reorganized by content type and role, using your existing routes
30+
sidebar: [
31+
// Intro
32+
{
33+
text: 'Introduction to Xian',
34+
link: '/introduction/'
35+
},
2336

24-
},
25-
{
26-
text: "Development",
27-
collapsed: false,
28-
items: [
29-
{ text: 'Tutorials', collapsed: false, items: [
30-
{ text: 'Creating A Token', link: '/tutorials/creating-a-token' },
31-
]
32-
},
37+
// Tutorials = “Build”
38+
{
39+
text: 'Build (Tutorials)',
40+
collapsed: false,
41+
items: [
42+
{ text: 'Creating a Token', link: '/tutorials/creating-a-token' },
43+
{ text: 'dApp Starters', link: '/dapp-starters/' }
44+
]
45+
},
3346

34-
{
35-
text: 'Smart Contracts',
36-
collapsed: true,
37-
items: [
38-
39-
{ text: 'Contracting Engine', link: '/contracts/' },
40-
{ text: 'Cheat Sheet', link: '/contracts/cheat-sheet' },
41-
{ text: 'Context', link: '/contracts/context' },
42-
{ text: 'Functions', link: '/contracts/functions' },
43-
{ text: 'Events', link: '/contracts/events' },
44-
{ text: 'Modules', collapsed: true, items: [
45-
{ text: 'Crypto', link: '/contracts/modules/crypto-stdlib' },
46-
{ text: 'Hashlib', link: '/contracts/modules/hashlib-stdlib' },
47-
{ text: 'Random', link: '/contracts/modules/random-stdlib' },
48-
{ text: 'Datetime', link: '/contracts/modules/datetime-stdlib' },
49-
{ text: 'Imports', link: '/contracts/modules/imports' },
50-
]
51-
},
52-
{
53-
text: 'Concepts',
54-
collapsed: true,
55-
items: [
56-
{ text: 'Stamps', link: '/contracts/concepts/stamps' },
57-
{ text: 'Storage', link: '/contracts/concepts/storage' },
58-
{ text: 'Valid Code', link: '/contracts/concepts/valid-code' },
59-
{ text: 'Contract Submission', link: '/contracts/concepts/contract-submission' },
60-
{ text: 'Model', link: '/contracts/concepts/model' },
61-
]
62-
},
63-
{
64-
text: 'Standards',
65-
collapsed: true,
66-
items: [
67-
{ text: 'XSC0001', link: '/contracts/standards/xsc0001' },
68-
{ text: 'XSC0002', link: '/contracts/standards/xsc0002' },
69-
{ text: 'XSC0003', link: '/contracts/standards/xsc0003' },
70-
]
71-
},
72-
{ text: 'Testing', link: '/contracts/testing' },
73-
{
74-
text: 'Examples',
75-
collapsed: true,
76-
items: [
77-
{ text: 'Overview', link: '/examples/' },
78-
{ text: 'Uber Dice', link: '/examples/uber-dice' },
79-
{ text: 'Token XSC003', link: '/examples/currency' },
80-
]
81-
},
82-
{ text: "Submitting a Contract", link: "/contracts/submitting-a-contract" }
83-
]
84-
},
85-
{
86-
text: 'dApp Starters',
87-
link: '/dapp-starters/'
88-
},
89-
{
90-
text: 'Read Functions Off-Chain',
91-
link: '/read-functions-off-chain/'
92-
},
93-
{
94-
text: 'Tools',
95-
collapsed: true,
96-
items: [
97-
{ text: 'xian-js', link: '/tools/xian-js' },
98-
{ text: 'xian-py', link: '/tools/xian-py' },
99-
{ text: 'Browser Wallet', link: '/tools/browser-wallet' },
100-
{ text: 'dApp Wallet Utils', link: '/tools/xian-wallet-utils' },
101-
{ text: 'Xian VS Code Extension', link: '/tools/xian-vs-code-extension' },
102-
{ text: 'Contract Dev Environment', link: '/tools/contract-dev-environment' },
103-
{ text: 'Faucet', link: '/tools/faucet' },
104-
]
105-
},
106-
{
107-
text: '💵 Bounty Program',
108-
link: '/bounty-program/'
109-
},
110-
{
111-
text: '🪙 Token Launch Contest',
112-
link: '/token-contest/'
113-
},
114-
]
115-
},
116-
{
117-
text: 'Node',
118-
collapsed: false,
119-
items: [
120-
{ text: 'Technology Stack', link: '/node/technology-stack' },
121-
{ text: 'Architecture', link: '/node/architecture' },
122-
{ text: 'Governance Model', link: '/node/governance-model' },
123-
{
124-
text: 'Interfaces',
125-
collapsed: true,
126-
items: [
127-
{ text: 'REST', link: '/node/interfaces/rest' },
128-
{ text: 'Websockets', link: '/node/interfaces/websockets' },
129-
{ text: 'GraphQL', link: '/node/interfaces/graphql' },
130-
]
131-
},
132-
{
133-
text: "Running a Node", link: "/node/running-a-node"
134-
}
135-
]
136-
},
137-
{
138-
text: 'Coin',
139-
collapsed: false,
47+
// Task-oriented guides
48+
{
49+
text: 'How-to Guides',
50+
collapsed: false,
51+
items: [
52+
{ text: 'Submitting a Contract', link: '/contracts/submitting-a-contract' },
53+
{ text: 'Read Functions Off-Chain', link: '/read-functions-off-chain/' },
54+
{ text: 'Testing', link: '/contracts/testing' }
55+
]
56+
},
57+
58+
// Specs & APIs
59+
{
60+
text: 'Reference',
61+
collapsed: false,
62+
items: [
63+
{
64+
text: 'Contract Language',
65+
collapsed: false,
66+
items: [
67+
// Core reference (kept together)
68+
{ text: 'Context', link: '/contracts/context' },
69+
{ text: 'Functions', link: '/contracts/functions' },
70+
{ text: 'Events', link: '/contracts/events' },
71+
{ text: 'Valid Code', link: '/contracts/concepts/valid-code' },
72+
{
73+
text: 'Modules',
74+
collapsed: true,
14075
items: [
141-
{ text: 'Economics', link: '/coin/economics' },
142-
{ text: 'Stamps', link: '/coin/stamps' },
143-
{ text: 'Acquiring and Storing', link: '/coin/acquiring-and-storing' },
76+
{ text: 'Crypto', link: '/contracts/modules/crypto-stdlib' },
77+
{ text: 'Hashlib', link: '/contracts/modules/hashlib-stdlib' },
78+
{ text: 'Random', link: '/contracts/modules/random-stdlib' },
79+
{ text: 'Datetime', link: '/contracts/modules/datetime-stdlib' },
80+
{ text: 'Imports', link: '/contracts/modules/imports' }
14481
]
145-
},
146-
{
147-
text: 'Staking & Governance',
148-
collapsed: false,
149-
link: '/governance/staking-governance.md'
150-
}
151-
],
82+
}
83+
]
84+
},
85+
{
86+
text: 'Standards',
87+
collapsed: true,
88+
items: [
89+
{ text: 'XSC0001', link: '/contracts/standards/xsc0001' },
90+
{ text: 'XSC0002', link: '/contracts/standards/xsc0002' },
91+
{ text: 'XSC0003', link: '/contracts/standards/xsc0003' }
92+
]
93+
},
94+
{
95+
text: 'APIs',
96+
collapsed: true,
97+
items: [
98+
// Rehome API docs from under Node → Interfaces into a single “APIs” bucket
99+
{ text: 'REST', link: '/node/interfaces/rest' },
100+
{ text: 'WebSockets', link: '/node/interfaces/websockets' },
101+
{ text: 'GraphQL', link: '/node/interfaces/graphql' }
102+
]
103+
}
104+
]
105+
},
106+
107+
// Why & architecture
108+
{
109+
text: 'Concepts (Explanations)',
110+
collapsed: true,
111+
items: [
112+
{ text: 'Contracting Engine', link: '/contracts/' },
113+
{ text: 'Model', link: '/contracts/concepts/model' },
114+
{ text: 'Storage', link: '/contracts/concepts/storage' },
115+
{ text: 'Stamps', link: '/contracts/concepts/stamps' },
116+
{ text: 'Contract Submission', link: '/contracts/concepts/contract-submission' }
117+
]
118+
},
119+
120+
// Operators / validators
121+
{
122+
text: 'Operate (Run a Node)',
123+
collapsed: true,
124+
items: [
125+
{ text: 'Technology Stack', link: '/node/technology-stack' },
126+
{ text: 'Architecture', link: '/node/architecture' },
127+
{ text: 'Governance Model', link: '/node/governance-model' },
128+
{ text: 'Running a Node', link: '/node/running-a-node' }
129+
]
130+
},
131+
132+
// Tooling ecosystem
133+
{
134+
text: 'SDKs & Tools',
135+
collapsed: true,
136+
items: [
137+
{ text: 'xian-js', link: '/tools/xian-js' },
138+
{ text: 'xian-py', link: '/tools/xian-py' },
139+
{ text: 'Browser Wallet', link: '/tools/browser-wallet' },
140+
{ text: 'dApp Wallet Utils', link: '/tools/xian-wallet-utils' },
141+
{ text: 'Xian VS Code Extension', link: '/tools/xian-vs-code-extension' },
142+
{ text: 'Contract Dev Environment', link: '/tools/contract-dev-environment' },
143+
{ text: 'Faucet', link: '/tools/faucet' }
144+
]
145+
},
146+
147+
// Example gallery
148+
{
149+
text: 'Examples & Cookbooks',
150+
collapsed: true,
151+
items: [
152+
{ text: 'Overview', link: '/examples/' },
153+
{ text: 'Uber Dice', link: '/examples/uber-dice' },
154+
{ text: 'Token XSC003', link: '/examples/currency' }
155+
]
156+
},
157+
158+
// Token holders, exchanges, governance participants
159+
{
160+
text: 'Token & Governance',
161+
collapsed: true,
162+
items: [
163+
{ text: 'Economics', link: '/coin/economics' },
164+
{ text: 'Stamps (Fees & Limits)', link: '/coin/stamps' },
165+
{ text: 'Acquiring and Storing', link: '/coin/acquiring-and-storing' },
166+
{ text: 'Staking & Governance', link: '/governance/staking-governance.md' }
167+
]
168+
},
169+
170+
// Programs / community
171+
{
172+
text: 'Community',
173+
collapsed: true,
174+
items: [
175+
{ text: '💵 Bounty Program', link: '/bounty-program/' },
176+
{ text: '🪙 Token Launch Contest', link: '/token-contest/' }
177+
]
178+
}
179+
],
180+
181+
socialLinks: [{ icon: 'github', link: 'https://github.com/xian-network' }],
182+
search: { provider: 'local' }
183+
},
152184

153-
socialLinks: [
154-
{ icon: 'github', link: 'https://github.com/xian-network' }
155-
],
156-
search: {
157-
provider: 'local'
158-
}
159-
},
160-
cleanUrls: true,
161-
srcDir: './src',
162-
base: '/',
185+
cleanUrls: true,
186+
srcDir: './src',
187+
base: '/'
163188
})

0 commit comments

Comments
 (0)