|
5 | 5 | ## Contents |
6 | 6 |
|
7 | 7 | - [Quick Start](#quick-start) |
8 | | -- [Fix or Improve Existing Content](#fix-or-improve-existing-content) |
9 | | -- [Add a New Page](#add-a-new-page) |
10 | | -- [Create a New Section](#create-a-new-section) |
11 | | -- [Write a Tutorial](#write-a-tutorial) |
12 | | -- [Working with Content Elements](#working-with-content-elements) |
13 | | - - [Adding Images](#adding-images) |
14 | | - - [Using Code Snippets](#using-code-snippets) |
15 | | - - [Adding Callout Boxes](#adding-callout-boxes) |
| 8 | +- [Edit Online with GitHub (Simple Changes)](#edit-online-with-github-simple-changes) |
| 9 | +- [Fork and Edit Locally](#fork-and-edit-locally) |
| 10 | + - [Fix or Improve Existing Content](#fix-or-improve-existing-content) |
| 11 | + - [Add a New Page](#add-a-new-page) |
| 12 | + - [Create a New Section](#create-a-new-section) |
| 13 | + - [Write a Tutorial](#write-a-tutorial) |
| 14 | + - [Working with Content Elements](#working-with-content-elements) |
| 15 | + - [Adding Images](#adding-images) |
| 16 | + - [Using Code Snippets](#using-code-snippets) |
| 17 | + - [Adding Callout Boxes](#adding-callout-boxes) |
16 | 18 |
|
17 | 19 | ## Quick Start |
18 | 20 |
|
19 | | -1. **Fork and Create Branch** |
| 21 | +There are two main ways to contribute: |
| 22 | + |
| 23 | +- **[Edit Online with GitHub](#edit-online-with-github-simple-changes)** |
| 24 | + - Best for simple text changes like fixing typos or making small updates directly in your browser. |
| 25 | + |
| 26 | +- **[Fork and Edit Locally](#fork-and-edit-locally)** |
| 27 | + - Recommended for more complex contributions that require local testing or previewing changes. |
| 28 | + |
| 29 | + |
| 30 | +## Edit Online with GitHub (Simple Changes) |
| 31 | + |
| 32 | +For simple contributions like fixing typos or making small text changes, you can use GitHub's online editor: |
| 33 | + |
| 34 | +### Making Your Changes |
| 35 | + |
| 36 | +1. **Navigate to the file** you want to edit on GitHub |
| 37 | +2. **Click the pencil icon** (✏️) to edit the file |
| 38 | +3. **Make your changes** in the online editor |
| 39 | +4. **Follow the style guide** - ensure your changes follow the [PaperMoon Style Guide](https://github.com/papermoonio/documentation-style-guide) |
| 40 | + |
| 41 | +### Creating Your Pull Request |
| 42 | + |
| 43 | +1. **Scroll to "Propose changes"** at the bottom of the editor |
| 44 | +2. **Add a descriptive commit message** explaining your changes |
| 45 | +3. **Click "Propose changes"** - GitHub will automatically: |
| 46 | + - Fork the repository to your account |
| 47 | + - Create a branch with your changes |
| 48 | + - Open a pull request |
| 49 | + |
| 50 | +## Fork and Edit Locally |
| 51 | + |
| 52 | +For more complex contributions which involve rendering (e.g. adding a `.Nav` section, code snippets, etc) or when you want to preview changes locally, follow these steps: |
| 53 | + |
| 54 | +### Initial Setup |
| 55 | + |
| 56 | +Before making contributions, you need to set up the proper directory structure for local development: |
| 57 | + |
| 58 | +1. **Clone the MkDocs repository** |
20 | 59 |
|
21 | 60 | ```bash |
| 61 | + git clone https://github.com/papermoonio/polkadot-mkdocs |
| 62 | + cd polkadot-mkdocs |
| 63 | + ``` |
| 64 | + |
| 65 | +2. **Fork and clone the docs repository inside polkadot-mkdocs** |
| 66 | + |
| 67 | + ```bash |
| 68 | + # Fork polkadot-docs on GitHub first, then: |
22 | 69 | git clone https://github.com/your-username/polkadot-docs.git |
23 | 70 | cd polkadot-docs |
24 | 71 | git checkout -b your-feature-branch |
25 | 72 | ``` |
26 | 73 |
|
27 | | -2. **Make Your Changes** |
| 74 | + Your directory structure should now look like: |
| 75 | + ``` |
| 76 | + polkadot-mkdocs/ |
| 77 | + ├── polkadot-docs/ # Your forked repository |
| 78 | + ├── material-overrides/ |
| 79 | + └── mkdocs.yml |
| 80 | + ``` |
| 81 | + |
| 82 | +### Making Changes |
| 83 | + |
| 84 | +1. **Make Your Changes** |
28 | 85 |
|
29 | 86 | - Follow the [PaperMoon Style Guide](https://github.com/papermoonio/documentation-style-guide) |
30 | | - - Test your changes locally (see [Running Polkadot Docs Locally](../README.md#run-polkadot-docs-locally)) |
| 87 | + - Test your changes locally (see [Run Polkadot Docs Locally](../README.md#run-polkadot-docs-locally)) |
31 | 88 |
|
32 | | -3. **Update AI Documentation** |
| 89 | +2. **Update AI Documentation** |
33 | 90 |
|
34 | 91 | After making content changes, regenerate the AI-ready documentation files. |
35 | 92 |
|
|
39 | 96 | ``` |
40 | 97 | **Note**: Run this script on every PR once all changes are committed. |
41 | 98 |
|
42 | | -4. **Create Pull Request** |
| 99 | +3. **Create Pull Request** |
43 | 100 |
|
44 | 101 | - Push your branch and create a pull request |
45 | 102 | - Use the PR template to indicate your review preference |
@@ -73,9 +130,11 @@ To add a page to an existing section: |
73 | 130 | # Page Title |
74 | 131 |
|
75 | 132 | ## Introduction |
| 133 | + |
76 | 134 | Write 2-3 paragraphs to introduce the topic. |
77 | 135 |
|
78 | 136 | ## Prerequisites |
| 137 | + |
79 | 138 | List any required tools, knowledge, or setup. |
80 | 139 | ``` |
81 | 140 |
|
@@ -156,21 +215,30 @@ categories: Category1, Category2 |
156 | 215 | # Tutorial Title |
157 | 216 |
|
158 | 217 | ## Introduction |
| 218 | +
|
159 | 219 | Brief explanation of what users will learn/build |
160 | 220 |
|
161 | 221 | ## Prerequisites |
| 222 | +
|
162 | 223 | Required knowledge/tools |
163 | 224 |
|
164 | 225 | ## [Action-Oriented Section Title] |
| 226 | +
|
165 | 227 | Instructions with commands |
166 | 228 |
|
167 | 229 | ## Verification |
| 230 | +
|
168 | 231 | How to confirm it worked |
169 | 232 |
|
170 | 233 | ## Where to Go Next |
| 234 | +
|
171 | 235 | Related tutorials |
172 | 236 | ``` |
173 | 237 |
|
| 238 | +### Tutorial Categories |
| 239 | + |
| 240 | +Available categories for tutorials are found in [scripts/llms_config.json](./scripts/llms_config.json). |
| 241 | + |
174 | 242 | ### Tutorial Requirements |
175 | 243 |
|
176 | 244 | - All code examples must be tested and functional |
|
0 commit comments