|
| 1 | +# RustFS Documentation Contribution Guide |
| 2 | + |
| 3 | +Welcome to the RustFS community! We really appreciate your interest in contributing to our documentation. Your contribution, whether it's fixing a typo or translating an entire guide, is important to us. This guide aims to provide you with clear instructions to help you smoothly participate in the co-construction of RustFS documentation. |
| 4 | + |
| 5 | +<p align="center"> |
| 6 | +English | |
| 7 | + <a href="https://github.com/rustfs/rustfs.com/blob/main/README_ZH.md">简体中文</a> | |
| 8 | + <a href="https://github.com/rustfs/rustfs.com/blob/main/README_JA.md">日本語</a> | |
| 9 | + <a href="https://github.com/rustfs/rustfs.com/blob/main/README_DA.md">(#deutsch)</a> | |
| 10 | + <a href="https://github.com/rustfs/rustfs.com/blob/main/README_FR.md">Français</a> |
| 11 | +</p> |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +(https://img.shields.io/badge/License-CC%20BY%204.0-blue.svg)](https://creativecommons.org/licenses/by/4.0/) |
| 17 | + |
| 18 | +(https://github.com/rustfs/rustfs/actions/workflows/docs.yml/badge.svg)](https://github.com/rustfs/rustfs/actions/workflows/docs.yml) |
| 19 | + |
| 20 | +(https://img.shields.io/discord/YOUR_SERVER_ID?label=Community%20Chat&logo=discord&color=5865F2)](https://discord.gg/YOUR_INVITE_LINK) |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +### Table of Contents |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +1. (#1-what-is-rustfs) |
| 29 | +2. (#2-our-mission-accessible--secure-data-for-everyone) |
| 30 | +3. Your Contribution Journey |
| 31 | + - (#31-getting-started-your-first-contribution) |
| 32 | + - (#32-translating-the-documentation-adding-a-new-language) |
| 33 | +4. (#4-the-technical-workflow) |
| 34 | + - Prerequisites |
| 35 | + - (#42-local-development-setup) |
| 36 | + - (#43-pull-request-pr--commit-guidelines) |
| 37 | + - (#44-automated-checks--deployment) |
| 38 | +5. Community & Licensing |
| 39 | + - Acknowledgements |
| 40 | + - Content License |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +### 1. What is RustFS? |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +RustFS is a simple, high-performance, distributed object storage solution. It is 100% S3-compatible and released under the Apache 2.0 license, making it a commercially-friendly open-source software. |
| 49 | + |
| 50 | +Written entirely in Rust—the modern programming language known for memory safety and exceptional performance 1—RustFS is developed by a global community of talented engineers. It is designed to be a powerful, reliable open-source alternative and can serve as a direct replacement for products like MinIO.2 |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +### 2. Our Mission: Accessible & Secure Data for Everyone |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +We believe that data storage should be affordable, reliable, and secure for everyone, everywhere. |
| 59 | + |
| 60 | +High-quality, multilingual documentation is central to this mission. It's not just an add-on; it's key to lowering the barrier to entry for users and developers across the globe. When you translate a guide or fix an error, you are directly helping people in different linguistic communities to more easily build robust, cost-effective data infrastructure. Your contributions empower a global audience, collectively enhancing data security and sovereignty. This community-driven approach to knowledge sharing maximizes the project's value and helps us truly realize our vision.4 |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +### 3. Your Contribution Journey |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +We have designed different pathways for various types of contributors. Whether you want to quickly fix a small issue or systematically translate the entire documentation, you'll find the right guide here. |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | +#### 3.1 Getting Started: Your First Contribution |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +The easiest way to get started is by making small edits directly through the GitHub web interface. This method requires no local development setup and is perfect for minor changes.6 |
| 77 | + |
| 78 | +Simple contributions you can make include: |
| 79 | + |
| 80 | +- Fixing typos or grammatical errors. |
| 81 | +- Correcting broken links. |
| 82 | +- Clarifying confusing sentences or paragraphs. |
| 83 | +- Reporting an issue for something you don't know how to fix. |
| 84 | + |
| 85 | +**The "5-Minute" Pull Request Process:** |
| 86 | + |
| 87 | +1. Navigate to the page you want to edit on the documentation site `https://docs.rustfs.com/`. |
| 88 | +2. Scroll to the bottom and click the "Edit this page on GitHub" link. |
| 89 | +3. This will take you to the corresponding Markdown source file on GitHub. Click the pencil icon (✏️) in the top right to enter edit mode. |
| 90 | +4. Make your changes in the text editor. |
| 91 | +5. When you're done, scroll to the bottom. In the "Propose changes" section, write a concise commit message, e.g., "Fix typo in installation guide." |
| 92 | +6. Click the "Propose changes" button. GitHub will then guide you through the process of creating a pull request. |
| 93 | + |
| 94 | +This process serves as an excellent "on-ramp for contributors," allowing you to familiarize yourself with our workflow without any complex setup. A successful lightweight contribution is often the first step toward deeper involvement.5 |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +#### 3.2 Translating the Documentation: Adding a New Language |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +This is the core area where we most need community help. Please follow these steps to add or improve translations. |
| 103 | + |
| 104 | +**Step 1: Coordinate via GitHub Issues** |
| 105 | + |
| 106 | +To avoid duplicated work and ensure collaboration, please visit our **[GitHub Issues page](https://github.com/rustfs/rustfs/issues)** before you start translating. |
| 107 | + |
| 108 | +- **Adding a New Language**: Check if someone else is already working on the language you want to translate. If not, please create a new issue with the title `[i18n] Add <Language> (<lang-code>) Translation`, e.g., `[i18n] Add German (de) Translation`. This helps us track progress and assign ownership.7 |
| 109 | +- **Improving an Existing Translation**: If you want to improve an existing translation, find the relevant issue or create a new one detailing the improvements you plan to make. |
| 110 | + |
| 111 | +**Step 2: Understand the Directory Structure** |
| 112 | + |
| 113 | +Our documentation site is built with VitePress, which uses a file-based directory structure to manage multiple languages.9 All source files are located in the |
| 114 | + |
| 115 | +`docs/` directory. |
| 116 | + |
| 117 | +``` |
| 118 | +docs/ |
| 119 | +├── en/ # English (or as the root directory) |
| 120 | +│ ├── guide/ |
| 121 | +│ │ └── getting-started.md |
| 122 | +│ └── index.md |
| 123 | +├── ja/ # Japanese |
| 124 | +│ ├── guide/ |
| 125 | +│ │ └── getting-started.md |
| 126 | +│ └── index.md |
| 127 | +└──.vitepress/ |
| 128 | + └── config.ts # VitePress configuration file |
| 129 | +``` |
| 130 | + |
| 131 | +**Step 3: Add a New Language Pack** |
| 132 | + |
| 133 | +1. **Fork and clone** the repository to your local machine, then create a new branch. |
| 134 | + |
| 135 | +2. In the `docs/` directory, create a new folder using the corresponding **ISO 639-1 language code** for your target language. Please refer to the language code table below. |
| 136 | + |
| 137 | +3. Copy the **entire contents** of `docs/en/` (or the English source files in the root) into your new language folder. This provides you with a complete file structure to translate. |
| 138 | + |
| 139 | +4. Open the `docs/.vitepress/config.ts` file and add a new entry for your language in the `locales` object. |
| 140 | + |
| 141 | + For example, to add German (`de`): |
| 142 | + |
| 143 | + TypeScript |
| 144 | + |
| 145 | + ``` |
| 146 | + //.vitepress/config.ts |
| 147 | + import { defineConfig } from 'vitepress' |
| 148 | + |
| 149 | + export default defineConfig({ |
| 150 | + //... other configs |
| 151 | + locales: { |
| 152 | + root: { |
| 153 | + label: 'English', |
| 154 | + lang: 'en' |
| 155 | + }, |
| 156 | + // Add the new locale config here |
| 157 | + de: { |
| 158 | + label: 'Deutsch', // Text in the language dropdown |
| 159 | + lang: 'de', // HTML lang attribute |
| 160 | + link: '/de/', // Link to redirect to |
| 161 | + // You can override theme configs for this locale, |
| 162 | + // e.g., for navbar and sidebar text. |
| 163 | + themeConfig: { |
| 164 | + nav: [ |
| 165 | + { text: 'Anleitung', link: '/de/guide/getting-started' } |
| 166 | + ], |
| 167 | + sidebar: { |
| 168 | + '/de/guide/': |
| 169 | + } |
| 170 | + ] |
| 171 | + } |
| 172 | + } |
| 173 | + } |
| 174 | + } |
| 175 | + }) |
| 176 | + ``` |
| 177 | + |
| 178 | + To help you configure this correctly, the following table explains the purpose of each property in the `locales` object.9 |
| 179 | + |
| 180 | +| Property | Type | Required | Description | |
| 181 | +| ------------- | -------- | -------- | ------------------------------------------------------------ | |
| 182 | +| `label` | `string` | Yes | The text that appears in the language selection dropdown menu in the navbar. | |
| 183 | +| `lang` | `string` | No | The `lang` attribute for the `<html>` tag. Uses the directory name if not specified. | |
| 184 | +| `link` | `string` | No | The link the user is redirected to when selecting this language. Defaults to the locale's root path (e.g., `/ja/`). | |
| 185 | +| `title` | `string` | No | Overrides the site's main title for this specific locale. | |
| 186 | +| `description` | `string` | No | Overrides the site's main description for this specific locale. | |
| 187 | +| `themeConfig` | `object` | No | Locale-specific theme configuration. Used to translate navbar links, sidebar text, etc. | |
| 188 | + |
| 189 | +``` |
| 190 | +This table is designed to eliminate ambiguity in the configuration, ensuring contributors can get it right the first time and reducing the need for back-and-forth revisions. |
| 191 | +``` |
| 192 | + |
| 193 | +**Step 4: Translate the Content** |
| 194 | + |
| 195 | +- In your new language directory, open the Markdown files one by one and translate the text content. |
| 196 | +- **Important**: Please **do not** translate the following: |
| 197 | + - Keys in the frontmatter (e.g., `title:`, `layout:`). |
| 198 | + - Any code within code blocks. |
| 199 | + - URL links. |
| 200 | + - HTML tags. |
| 201 | +- Only translate the human-readable text. |
| 202 | + |
| 203 | +**Step 5: Submit Your Pull Request** |
| 204 | + |
| 205 | +Once you've finished translating, please follow the(#43-pull-request-pr--commit-guidelines) to submit your contribution, and make sure to link it to the issue you created in Step 1. |
| 206 | + |
| 207 | +**Language Code Reference** |
| 208 | + |
| 209 | +To ensure consistency, please use the standard ISO 639-1 codes from the table below.13 |
| 210 | + |
| 211 | +| Language | ISO 639-1 Code | |
| 212 | +| -------------------- | --------------- | |
| 213 | +| Chinese (Simplified) | `zh` or `zh-CN` | |
| 214 | +| English | `en` | |
| 215 | +| Japanese | `ja` | |
| 216 | +| German | `de` | |
| 217 | +| French | `fr` | |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | +### 4. The Technical Workflow |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | +For developers who wish to make more substantial contributions locally (such as adding a new language pack or making extensive changes), please follow this technical workflow. |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | +#### 4.1 Prerequisites |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | +Before you begin, please ensure you have the following software installed on your system: |
| 234 | + |
| 235 | +- **Node.js**: Version `18.x` or higher.14 You can download it from the |
| 236 | + |
| 237 | + [official Node.js website](https://nodejs.org/). |
| 238 | + |
| 239 | +- **Package Manager**: We recommend using `pnpm` for efficiency. You can install it globally with `npm install -g pnpm`. Alternatively, you can use `npm` or `yarn`.15 |
| 240 | + |
| 241 | +- **Git**: A version control system. You can download it from the [official Git website](https://git-scm.com/). |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | +#### 4.2 Local Development Setup |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | +Follow this sequence of commands to run the documentation development server locally: |
| 250 | + |
| 251 | +1. Fork & Clone the Repository |
| 252 | + |
| 253 | + First, fork this repository on GitHub. Then, clone your fork to your local machine. |
| 254 | + |
| 255 | + Bash |
| 256 | + |
| 257 | + ``` |
| 258 | + # Replace <YOUR_USERNAME> with your GitHub username |
| 259 | + git clone https://github.com/<YOUR_USERNAME>/docs.rustfs.com.git |
| 260 | + cd docs.rustfs.com |
| 261 | + ``` |
| 262 | + |
| 263 | +2. Install Dependencies |
| 264 | + |
| 265 | + Use pnpm to install all required project dependencies. |
| 266 | + |
| 267 | + Bash |
| 268 | + |
| 269 | + ``` |
| 270 | + pnpm install |
| 271 | + ``` |
| 272 | + |
| 273 | +3. Run the Development Server |
| 274 | + |
| 275 | + This command will start a local development server with hot-reloading enabled. |
| 276 | + |
| 277 | + Bash |
| 278 | + |
| 279 | + ``` |
| 280 | + pnpm docs:dev |
| 281 | + ``` |
| 282 | + |
| 283 | +4. Access the Site |
| 284 | + |
| 285 | + After successful execution, you should see output in your terminal similar to VitePress dev server running at: http://localhost:5173/. Open this URL in your browser to see the documentation site. Any changes you make to the Markdown files will be reflected instantly in the browser.15 |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | +#### 4.3 Pull Request (PR) & Commit Guidelines |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | +We follow a standardized workflow to ensure code quality and a clean project history. |
| 294 | + |
| 295 | +- **Branching Strategy** |
| 296 | + |
| 297 | + - Always create a new branch for your work. Do not commit directly to the `main` branch. |
| 298 | + - Use a descriptive branch name, such as `feat/add-german-translation` or `fix/correct-s3-api-typo`.17 |
| 299 | + |
| 300 | +- Commit Message Convention |
| 301 | + |
| 302 | + We adhere to the Conventional Commits specification. This helps us automate changelogs and makes the commit history easier to understand. |
| 303 | + |
| 304 | + - **Format**: `<type>(<scope>): <subject>` |
| 305 | + |
| 306 | + - **Examples**: |
| 307 | + |
| 308 | + - `feat(i18n): add initial french translation` |
| 309 | + |
| 310 | + - `fix(guide): correct typo in getting-started.md` |
| 311 | + |
| 312 | + - docs(contributing): update local development setup |
| 313 | + |
| 314 | + This structured approach is a best practice in many mature open-source projects.8 |
| 315 | + |
| 316 | +- **Submitting a Pull Request** |
| 317 | + |
| 318 | + 1. Push your branch to your fork: `git push -u origin your-branch-name`. |
| 319 | + 2. On GitHub, open a pull request from your fork to the `main` branch of the `rustfs/docs.rustfs.com` repository. |
| 320 | + 3. **Link the Issue**: In the PR description, use keywords like `Closes #123` or `Fixes #123` to link the issue you created earlier. This will automatically close the issue when the PR is merged, a key step in our workflow automation.7 |
| 321 | + 4. **Write a Clear Description**: Clearly explain **what** you changed and **why**. If your changes are visual, please include before-and-after screenshots.5 |
| 322 | + |
| 323 | +- **The Review Process** |
| 324 | + |
| 325 | + - Once you submit a PR, a project maintainer will review it. |
| 326 | + - We may request changes. Please don't be discouraged! This is a normal part of collaborative open-source development aimed at improving the quality of contributions. |
| 327 | + - Once your PR is approved and all automated checks have passed, a maintainer will merge it. |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | +#### 4.4 Automated Checks & Deployment |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | +To ensure the quality and stability of our documentation, we have a fully automated CI/CD (Continuous Integration/Continuous Deployment) pipeline. |
| 336 | + |
| 337 | +- **Automated Checks**: When you submit a pull request, GitHub Actions will automatically run a series of checks. These checks verify that the documentation site builds successfully and that the code formatting is correct (linting).19 |
| 338 | +- **Automated Deployment**: Once your PR is merged into the `main` branch, GitHub Actions will trigger again, automatically building the latest version of the site and deploying it to `https://docs.rustfs.com`. |
| 339 | + |
| 340 | +By making this process transparent, we aim to build contributor trust in our workflow. You don't need to worry about the deployment details; a successful merge means a successful deployment. This gives you a clear view of the entire lifecycle of your contribution, from submission to publication.19 |
| 341 | + |
| 342 | + |
| 343 | + |
| 344 | +### 5. Community & Licensing |
| 345 | + |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
| 350 | +#### 5.1 Acknowledgements |
| 351 | + |
| 352 | + |
| 353 | + |
| 354 | +The RustFS documentation is built by the community, for the community. We are incredibly grateful to everyone who contributes their time and expertise. |
| 355 | + |
| 356 | +Every contribution, no matter how small, is highly valued. To fairly and transparently recognize all contributions, we use GitHub's built-in tools. |
| 357 | + |
| 358 | +You can see a list of all our amazing contributors on the **[Contributors graph](https://github.com/rustfs/docs.rustfs.com/graphs/contributors)**. This automated, scalable approach ensures that every contribution is acknowledged and always up-to-date.22 |
| 359 | + |
| 360 | + |
| 361 | + |
| 362 | +#### 5.2 Content License |
| 363 | + |
| 364 | + |
| 365 | + |
| 366 | +All documentation in this project is licensed under the **Creative Commons Attribution 4.0 International License**.23 |
| 367 | + |
| 368 | +By contributing to the RustFS documentation project, you agree that your contributions will be released under this license. |
| 369 | + |
| 370 | +Under this license, you are free to: |
| 371 | + |
| 372 | +- **Share** — copy and redistribute the material in any medium or format. |
| 373 | +- **Adapt** — remix, transform, and build upon the material for any purpose, even commercially. |
| 374 | + |
| 375 | +You must follow these terms: |
| 376 | + |
| 377 | +- **Attribution** — You must give **appropriate credit**, provide a link to the license, and **indicate if changes were made**. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.23 |
0 commit comments