Skip to content

Commit a74ec82

Browse files
64ixLe-Caignec
andauthored
Feat: Migrate the guides from protocol documentation (#36)
Co-authored-by: Robin Le Caignec <72495599+Le-Caignec@users.noreply.github.com> Co-authored-by: Le-Caignec <robinlecaignec@yahoo.fr>
1 parent ee3111c commit a74ec82

16 files changed

+3615
-417
lines changed

.vitepress/config.mts

Lines changed: 0 additions & 139 deletions
This file was deleted.

.vitepress/config.ts

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
import { transformerTwoslash } from '@shikijs/vitepress-twoslash';
2+
import tailwindcss from '@tailwindcss/vite';
3+
import { defineConfig, loadEnv } from 'vitepress';
4+
import { fileURLToPath, URL } from 'node:url';
5+
import { getSidebar } from './sidebar';
6+
import {
7+
groupIconMdPlugin,
8+
groupIconVitePlugin,
9+
} from 'vitepress-plugin-group-icons';
10+
import { withMermaid } from 'vitepress-plugin-mermaid';
11+
12+
// Charger les variables d'environnement
13+
const env = loadEnv('', process.cwd());
14+
15+
// https://vitepress.dev/reference/site-config
16+
export default withMermaid(
17+
defineConfig({
18+
title: 'iExec documentation',
19+
description:
20+
'Build decentralized applications that combine ownership, privacy, and monetization.',
21+
cleanUrls: true,
22+
lastUpdated: true,
23+
vite: {
24+
plugins: [tailwindcss(), groupIconVitePlugin()],
25+
resolve: {
26+
alias: {
27+
'@': fileURLToPath(new URL('../src', import.meta.url)),
28+
},
29+
},
30+
// Expose environment variables to the client
31+
define: {
32+
'import.meta.env.VITE_REOWN_PROJECT_ID': JSON.stringify(
33+
env.VITE_REOWN_PROJECT_ID
34+
),
35+
},
36+
},
37+
srcDir: './src',
38+
markdown: {
39+
codeTransformers: [transformerTwoslash()],
40+
config(md) {
41+
md.use(groupIconMdPlugin);
42+
},
43+
},
44+
45+
head: [
46+
['link', { rel: 'icon', href: '/Logo-RLC-Yellow.png' }],
47+
[
48+
'link',
49+
{
50+
rel: 'stylesheet',
51+
href: 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap',
52+
},
53+
],
54+
[
55+
'script',
56+
{},
57+
`
58+
window.axeptioSettings = {
59+
clientId: "6413111857e4d2a6342cd5c6",
60+
cookiesVersion: "iexec-en",
61+
};
62+
63+
(function(d, s) {
64+
var t = d.getElementsByTagName(s)[0], e = d.createElement(s);
65+
e.async = true; e.src = "//static.axept.io/sdk.js";
66+
t.parentNode.insertBefore(e, t);
67+
})(document, "script");
68+
`,
69+
],
70+
// Mava widget
71+
[
72+
'script',
73+
{
74+
defer: '',
75+
src: 'https://widget.mava.app',
76+
'widget-version': 'v2',
77+
id: 'MavaWebChat',
78+
'enable-sdk': 'false',
79+
'data-token':
80+
'8e4e10aad5750451e8726768e8c639dae54f461beeb176f5ebd687371c9390f2',
81+
},
82+
],
83+
// Hotjar Tracking Script
84+
[
85+
'script',
86+
{},
87+
`
88+
(function(h,o,t,j,a,r){
89+
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
90+
h._hjSettings={hjid:5303222,hjsv:6};
91+
a=o.getElementsByTagName('head')[0];
92+
r=o.createElement('script');r.async=1;
93+
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
94+
a.appendChild(r);
95+
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
96+
`,
97+
],
98+
],
99+
100+
themeConfig: {
101+
// https://vitepress.dev/reference/default-theme-config
102+
nav: [
103+
{ text: 'Get Started', link: '/get-started/welcome' },
104+
{ text: 'Guides', link: '/guides/build-iapp/' },
105+
{ text: 'References', link: '/references/dataProtector' },
106+
{
107+
component: 'ChainSelector',
108+
props: {
109+
className: 'w-48',
110+
},
111+
},
112+
],
113+
outline: {
114+
level: [2, 4],
115+
},
116+
117+
sidebar: getSidebar(),
118+
119+
search: {
120+
provider: 'local',
121+
},
122+
123+
socialLinks: [
124+
{ icon: 'github', link: 'https://github.com/iExecBlockchainComputing' },
125+
{ icon: 'x', link: 'https://twitter.com/iEx_ec' },
126+
{ icon: 'discord', link: 'https://discord.com/invite/pbt9m98wnU' },
127+
],
128+
129+
editLink: {
130+
pattern:
131+
'https://github.com/iExecBlockchainComputing/documentation/blob/main/:path',
132+
text: 'Suggest changes to this page',
133+
},
134+
135+
logo: {
136+
light: '/Logo-RLC-Yellow.png',
137+
dark: '/Logo-RLC-Yellow.png',
138+
alt: 'iExec logo',
139+
},
140+
},
141+
})
142+
);

.vitepress/sidebar.ts

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ export function getSidebar() {
127127
},
128128
],
129129
},
130+
{
131+
text: 'TEE Technology',
132+
collapsed: true,
133+
items: [
134+
{
135+
text: 'Intel SGX Technology Overview',
136+
link: '/get-started/protocol/tee/intel-sgx-technology',
137+
},
138+
],
139+
},
130140
],
131141
},
132142
],
@@ -175,6 +185,44 @@ export function getSidebar() {
175185
text: 'Debugging',
176186
link: '/guides/build-iapp/debugging',
177187
},
188+
{
189+
text: 'Advanced',
190+
collapsed: true,
191+
items: [
192+
{
193+
text: 'Overview',
194+
link: '/guides/build-iapp/advanced/overview',
195+
},
196+
{
197+
text: 'Quick Start for Developers',
198+
link: '/guides/build-iapp/advanced/quick-start-for-developers',
199+
},
200+
{
201+
text: 'Build your first application',
202+
link: '/guides/build-iapp/advanced/your-first-app',
203+
},
204+
{
205+
text: 'Build your first SGX app (SCONE)',
206+
link: '/guides/build-iapp/advanced/create-your-first-sgx-app',
207+
},
208+
{
209+
text: 'End-to-end Encryption',
210+
link: '/guides/build-iapp/advanced/end-to-end-encryption',
211+
},
212+
{
213+
text: 'SGX Encrypted Dataset',
214+
link: '/guides/build-iapp/advanced/sgx-encrypted-dataset',
215+
},
216+
{
217+
text: 'Access Confidential Assets',
218+
link: '/guides/build-iapp/advanced/access-confidential-assets',
219+
},
220+
{
221+
text: 'Build Intel TDX app',
222+
link: '/guides/build-iapp/advanced/create-your-first-tdx-app',
223+
},
224+
],
225+
},
178226
],
179227
},
180228
{
@@ -562,5 +610,5 @@ export function getSidebar() {
562610
link: '/references/glossary',
563611
},
564612
],
565-
} satisfies DefaultTheme.Sidebar;
613+
} as DefaultTheme.Sidebar;
566614
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,4 @@ for input parameters:
192192
- migrate github SDK doc here
193193
- migrate pay-per-task page into a guide
194194
- check pages (introduction & getting-started) for use-iapp guide
195+
- Rework Advanced iApp building guides. (from "old" protocol doc)

0 commit comments

Comments
 (0)