Skip to content

Commit b25f52b

Browse files
committed
Update workflow
1 parent 4b3e615 commit b25f52b

File tree

3 files changed

+97
-28
lines changed

3 files changed

+97
-28
lines changed

.CONTRIBUTING.md

Lines changed: 81 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,88 @@
55
## Contents
66

77
- [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)
1618

1719
## Quick Start
1820

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**
2059

2160
```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:
2269
git clone https://github.com/your-username/polkadot-docs.git
2370
cd polkadot-docs
2471
git checkout -b your-feature-branch
2572
```
2673

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**
2885

2986
- 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))
3188

32-
3. **Update AI Documentation**
89+
2. **Update AI Documentation**
3390

3491
After making content changes, regenerate the AI-ready documentation files.
3592

@@ -39,7 +96,7 @@
3996
```
4097
**Note**: Run this script on every PR once all changes are committed.
4198

42-
4. **Create Pull Request**
99+
3. **Create Pull Request**
43100

44101
- Push your branch and create a pull request
45102
- Use the PR template to indicate your review preference
@@ -73,9 +130,11 @@ To add a page to an existing section:
73130
# Page Title
74131

75132
## Introduction
133+
76134
Write 2-3 paragraphs to introduce the topic.
77135

78136
## Prerequisites
137+
79138
List any required tools, knowledge, or setup.
80139
```
81140

@@ -156,21 +215,30 @@ categories: Category1, Category2
156215
# Tutorial Title
157216
158217
## Introduction
218+
159219
Brief explanation of what users will learn/build
160220
161221
## Prerequisites
222+
162223
Required knowledge/tools
163224
164225
## [Action-Oriented Section Title]
226+
165227
Instructions with commands
166228
167229
## Verification
230+
168231
How to confirm it worked
169232
170233
## Where to Go Next
234+
171235
Related tutorials
172236
```
173237

238+
### Tutorial Categories
239+
240+
Available categories for tutorials are found in [scripts/llms_config.json](./scripts/llms_config.json).
241+
174242
### Tutorial Requirements
175243

176244
- All code examples must be tested and functional

.github/pull_request_template.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
## Description
1+
## 📝 Description
22

33
Provide a clear and concise description of your changes.
44

5-
## Review Process Preference
5+
## 🔍 Review Preference
66

7-
Select your preference for the review process:
7+
Choose one:
8+
- [ ] ✅ I have time to handle formatting/style feedback myself
9+
- [ ] ⚡ Docs team handles formatting (check "Allow edits from maintainers")
810

9-
- [ ] I have time to handle formatting and style review feedback myself
10-
- [ ] Please have the Polkadot Docs team take over for formatting review to expedite the process (you must also check "Allow edits from maintainers" at the bottom of this page)
11+
## 🤖 AI Docs
1112

12-
## Checklist
13+
If content changed, regenerate AI files:
14+
- [ ] ✅ I ran `python3 scripts/generate_llms.py`
15+
- [ ] ⚡ Docs team will regenerate (check "Allow edits from maintainers")
1316

14-
Before submitting this PR, please verify:
17+
## ✅ Checklist
1518

16-
- [ ] I have tested my changes locally
17-
- [ ] I have followed the [PaperMoon Documentation Style Guide](https://github.com/papermoonio/documentation-style-guide) (required)
18-
- [ ] I have run `python3 scripts/generate_llms.py` to update AI documentation files (if applicable)
19-
20-
**For content with images:**
21-
22-
- [ ] Images are in `.webp` format
23-
- [ ] Images follow size requirements (1512px width for desktop screenshots, 400x600px for browser extensions)
19+
- [ ] Changes tested
20+
- [ ] [PaperMoon Style Guide](https://github.com/papermoonio/documentation-style-guide) followed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ To set up the structure, follow these steps:
3939
cd polkadot-mkdocs
4040
git clone https://github.com/polkadot-developers/polkadot-docs.git
4141
```
42+
> **📋 Contributing?** If you plan to [contribute](./CONTRIBUTING.md) to the documentation, fork the `polkadot-docs` repository first and clone your fork instead:
43+
> ```bash
44+
> git clone https://github.com/your-username/polkadot-docs.git
45+
> ```
4246

4347
### Set Up Python Environment
4448

0 commit comments

Comments
 (0)