Skip to content

Commit 83eab2f

Browse files
committed
feat: add contributing guide for improved documentation collaboration
1 parent 95955ba commit 83eab2f

File tree

2 files changed

+402
-83
lines changed

2 files changed

+402
-83
lines changed

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 392 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,392 @@
1+
# Contributing Guide - iExec Documentation
2+
3+
Welcome to the iExec documentation contribution guide! This guide explains how
4+
to effectively participate in the development and improvement of the
5+
documentation.
6+
7+
## πŸ“‹ Prerequisites
8+
9+
- **Node.js**: Version 22 or higher
10+
- **npm**: Comes bundled with Node.js
11+
- **Git**: For version control
12+
- **Vale** (optional): For documentation quality checks
13+
14+
## πŸš€ Quick Start
15+
16+
### 1. Initial Setup
17+
18+
1. **Fork the repository**:
19+
[![fork-button](/src/public/fork-button.png)](https://github.com/iExecBlockchainComputing/documentation/fork)
20+
21+
2. **Clone your fork**:
22+
23+
```bash
24+
git clone https://github.com/YOUR_USERNAME/documentation.git
25+
cd documentation
26+
```
27+
28+
3. **Install dependencies**:
29+
30+
```bash
31+
npm install
32+
```
33+
34+
4. **Start the development server**:
35+
```bash
36+
npm run dev
37+
```
38+
39+
### 2. Contribution Workflow
40+
41+
1. **Create a branch**:
42+
43+
```bash
44+
git checkout -b feature/your-feature-name
45+
```
46+
47+
2. **Make your changes**
48+
49+
3. **Test locally**:
50+
51+
```bash
52+
npm run dev
53+
```
54+
55+
4. **Commit your changes**:
56+
57+
```bash
58+
git add .
59+
git commit -m "Add: description of your changes"
60+
```
61+
62+
5. **Push to your fork**:
63+
64+
```bash
65+
git push origin feature/your-feature-name
66+
```
67+
68+
6. **Create a Pull Request**
69+
70+
## 🧱 Component Usage Guide
71+
72+
### Container - VitePress Native Containers (Recommended)
73+
74+
**We recommend using VitePress native container syntax** instead of the Vue
75+
component for better compatibility and simplicity.
76+
77+
#### Preferred Usage (VitePress Native)
78+
79+
```markdown
80+
::: info Your informational content here... :::
81+
82+
::: tip Helpful tips and suggestions... :::
83+
84+
::: warning Important warnings and cautions... :::
85+
86+
::: danger Critical warnings and error messages... :::
87+
```
88+
89+
#### Alternative Usage (Vue Component)
90+
91+
The `Container` component extends VitePress default containers with additional
92+
styling, but should only be used when you need specific custom behavior:
93+
94+
```vue
95+
<Container variant="success" title="Success">
96+
Your content here...
97+
</Container>
98+
99+
<Container variant="info" title="Information">
100+
Informational content...
101+
</Container>
102+
103+
<Container variant="danger" title="Warning">
104+
Warning message...
105+
</Container>
106+
```
107+
108+
#### Available Variants
109+
110+
- `success`: Success style with green border
111+
- `info`: Informational style (default)
112+
- `danger`: Warning style with red border
113+
114+
### Banner - Stylized Page Headers
115+
116+
The `Banner` component is perfect for creating attractive page headers with
117+
gradient styling.
118+
119+
#### Usage
120+
121+
```vue
122+
<Banner>
123+
124+
## Your Section Title
125+
126+
Description of your section with elegant styling.
127+
128+
</Banner>
129+
```
130+
131+
#### Features
132+
133+
- Automatic gradient background
134+
- Rounded borders
135+
- Optimized for h2 titles
136+
- Responsive and accessible
137+
138+
### CardWithBorder - Cards with Border
139+
140+
Use this component to create cards with defined borders and soft backgrounds.
141+
142+
#### Usage
143+
144+
```vue
145+
<CardWithBorder>
146+
147+
### Card Title
148+
149+
Your card content with border. Ideal for highlighting important information.
150+
151+
- Point 1
152+
- Point 2
153+
- Point 3
154+
155+
</CardWithBorder>
156+
```
157+
158+
#### Features
159+
160+
- Defined border with theme colors
161+
- Soft background
162+
- Generous padding (2rem)
163+
- Rounded corners
164+
165+
### CardWithoutBorder - Borderless Cards
166+
167+
For more subtle cards without visible borders.
168+
169+
#### Usage
170+
171+
```vue
172+
<CardWithoutBorder>
173+
174+
### Card Content
175+
176+
This card has no border but maintains a soft background for readability.
177+
178+
</CardWithoutBorder>
179+
```
180+
181+
#### Features
182+
183+
- No visible border
184+
- Soft background to contrast with page
185+
- Moderate padding (1.5rem)
186+
- Minimalist style
187+
188+
## πŸ“ Component Best Practices
189+
190+
### 1. When to Use Each Component
191+
192+
- **VitePress Containers** (`::: info`, `::: tip`, etc.): **Preferred** for
193+
notes, warnings, and informational messages
194+
- **Banner**: For important section headers
195+
- **CardWithBorder**: To highlight important content
196+
- **CardWithoutBorder**: To group content subtly
197+
- **Container Component**: Only when you need the specific "success" variant not
198+
available in VitePress native containers
199+
200+
### 2. Combined Usage Example
201+
202+
````markdown
203+
<Banner>
204+
205+
## Installation Guide
206+
207+
</Banner>
208+
209+
::: info Prerequisites Make sure you have Node.js installed before continuing.
210+
:::
211+
212+
<CardWithBorder>
213+
214+
### Step 1: Installation
215+
216+
\```bash npm install \```
217+
218+
</CardWithBorder>
219+
220+
<CardWithoutBorder>
221+
222+
### Step 2: Configuration
223+
224+
Create your `.env` file based on `.env.example`.
225+
226+
</CardWithoutBorder>
227+
228+
::: tip Success! Your installation is now complete! :::
229+
````
230+
231+
## πŸ“š Project Structure
232+
233+
### File Organization
234+
235+
```
236+
src/
237+
β”œβ”€β”€ components/ # Reusable Vue components
238+
β”œβ”€β”€ get-started/ # Getting started guides
239+
β”œβ”€β”€ guides/ # Detailed guides
240+
β”œβ”€β”€ protocol/ # Protocol documentation
241+
β”œβ”€β”€ references/ # API references
242+
└── assets/ # Images and resources
243+
```
244+
245+
### Naming Conventions
246+
247+
To maintain consistency, use these parameter names:
248+
249+
- `protectedData`: '0x123abc...'
250+
- `protectedDataAddress`: '0x123abc...'
251+
- `authorizedApp`: '0x456def...'
252+
- `authorizedUser`: '0x789cba...'
253+
- `userAddress`: '0x789cba...'
254+
- `appWhitelist`: '0xba46d6...'
255+
- `owner`: '0xa0c15e...'
256+
- `newOwner`: '0xc5e9f4...'
257+
- `voucherOwner`: '0x5714eB...'
258+
- `renterAddress`: '0x246bdf...'
259+
- `subscriberAddress`: '0x246bdf...'
260+
- `workerpool`: '0xa5de76...'
261+
- `taskId`: '0x7ac398...'
262+
263+
### Commit Message Conventions
264+
265+
Follow these patterns for commit messages:
266+
267+
- `Add: new feature or content`
268+
- `Update: modify existing content`
269+
- `Fix: correct errors or issues`
270+
- `Remove: delete obsolete content`
271+
- `Docs: documentation-only changes`
272+
273+
Examples:
274+
275+
```
276+
Add: CardWithBorder component usage guide
277+
Update: VitePress container recommendations
278+
Fix: broken links in getting started guide
279+
```
280+
281+
## βœ… Documentation Quality with Vale
282+
283+
### Vale Installation
284+
285+
**macOS:**
286+
287+
```bash
288+
brew install Vale/tap/vale
289+
```
290+
291+
**Linux (Snap):**
292+
293+
```bash
294+
snap install vale
295+
```
296+
297+
**Windows:**
298+
299+
```bash
300+
choco install vale
301+
```
302+
303+
### Using Vale
304+
305+
```bash
306+
# Download external configurations
307+
vale sync
308+
309+
# Check all documentation files
310+
vale src/
311+
312+
# Check specific files
313+
vale src/get-started/helloWorld/1-overview.md
314+
315+
# Get detailed output
316+
vale --output=line src/
317+
318+
# Generate comprehensive report with statistics
319+
vale --output=line src/ > vale-report.txt 2>&1
320+
```
321+
322+
Vale checks for:
323+
324+
- Language clarity and conciseness
325+
- Terminology consistency
326+
- Professional tone
327+
- Accessibility best practices
328+
329+
## πŸ”§ Environment Variables (Optional)
330+
331+
To work with Hello World pages, create a `.env` file:
332+
333+
```bash
334+
cp .env.example .env
335+
```
336+
337+
Fill with your values:
338+
339+
```env
340+
VITE_REOWN_PROJECT_ID=your_project_id_here
341+
```
342+
343+
### Getting your VITE_REOWN_PROJECT_ID
344+
345+
1. Go to [https://dashboard.reown.com/](https://dashboard.reown.com/)
346+
2. Create an account if necessary
347+
3. Click "Create Project"
348+
4. Fill in project information
349+
5. Copy the "Project ID" to your `.env`
350+
351+
## πŸ› Testing and Validation
352+
353+
### Local Testing
354+
355+
```bash
356+
# Build the project
357+
npm run build
358+
359+
# Check syntax
360+
npm run lint
361+
362+
# Documentation tests with Vale
363+
vale src/
364+
```
365+
366+
### Before Submitting
367+
368+
- [ ] Development server runs without errors
369+
- [ ] Vale reports no critical errors
370+
- [ ] All links work
371+
- [ ] Components display correctly
372+
- [ ] Content is accessible and responsive
373+
374+
## πŸ†˜ Support and Help
375+
376+
- πŸ“– [Documentation](https://docs.iex.ec)
377+
- πŸ’¬ [Discord Community](https://discord.com/invite/pbt9m98wnU)
378+
- πŸ›
379+
[Issue Tracker](https://github.com/iExecBlockchainComputing/documentation/issues)
380+
381+
## πŸ’‘ Tips for Contributors
382+
383+
1. **Read existing documentation** before contributing to understand the style
384+
and structure
385+
2. **Always test locally** before submitting a PR
386+
3. **Use appropriate components** to maintain visual consistency
387+
4. **Write descriptive commit messages**
388+
5. **Ask for help** if you're unsure about something
389+
6. **Prefer VitePress native containers** (`::: info`, `::: tip`, etc.) over Vue
390+
components when possible
391+
392+
Thank you for contributing to improve the iExec documentation! πŸŽ‰

0 commit comments

Comments
Β (0)