Skip to content

Commit 8980346

Browse files
update contributng path
1 parent bd174e6 commit 8980346

File tree

1 file changed

+94
-4
lines changed

1 file changed

+94
-4
lines changed

.CONTRIBUTING/.CONTRIBUTING.md

Lines changed: 94 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,36 @@
1-
# Contribute to the Polkadot Developer Docs
1+
# Contributing to Polkadot Documentation
22

3-
The documentation source files are written in [Markdown](https://daringfireball.net/projects/markdown) and generally follow the [PaperMoon style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md). If the PaperMoon style guide doesn't provide explicit guidance on a particular subject, please default to the [Google developer documentation style guide](https://developers.google.com/style).
3+
Welcome! We're excited that you want to contribute to the Polkadot developer documentation. This guide will help you get started and ensure a smooth contribution experience.
44

5-
This guide covers how to contribute to the documentation, including serving a local version of the site, adding new pages and directories, managing images and code snippets, and a few SEO tips.
5+
## Quick Start for Contributors
6+
7+
**New to contributing?** Start here:
8+
9+
1. **Fork the repository** and create a branch for your changes
10+
2. **Choose your review preference**: Let us know if you'd prefer to handle formatting and style reviews yourself, or if you'd like our team to take over to expedite the process
11+
12+
The documentation source files are written in [Markdown](https://daringfireball.net/projects/markdown) and follow the [PaperMoon style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md). For topics not covered by PaperMoon, we default to the [Google developer documentation style guide](https://developers.google.com/style).
13+
14+
## Types of Contributions
15+
16+
### Documentation Updates
17+
You can contribute by:
18+
- **Fixing errors or outdated information** - Spotted incorrect information? Please fix it!
19+
- **Improving clarity** - Make existing content clearer or more comprehensive
20+
- **Adding missing content** - Fill gaps in the documentation
21+
- **Updating examples** - Keep code examples current and functional
22+
23+
### Tutorial Contributions
24+
For tutorial contributions, please see our [tutorial contribution guidelines](.CONTRIBUTING/tutorials/README.md).
625

726
## Contents
827

9-
- [Contribute to the Polkadot Developer Docs](#contribute-to-the-polkadot-developer-docs)
28+
- [Contributing to Polkadot Documentation](#contributing-to-polkadot-documentation)
29+
- [Quick Start for Contributors](#quick-start-for-contributors)
30+
- [Types of Contributions](#types-of-contributions)
1031
- [Contents](#contents)
32+
- [Contribution Workflow](#contribution-workflow)
33+
- [Generating AI-Ready Documentation](#generating-ai-ready-documentation)
1134
- [Viewing Site Locally](#viewing-site-locally)
1235
- [Clone Repositories](#clone-repositories)
1336
- [Install Dependencies and Serve Site](#install-dependencies-and-serve-site)
@@ -22,6 +45,73 @@ This guide covers how to contribute to the documentation, including serving a lo
2245
- [Image Annotations](#image-annotations)
2346
- [Search Engine Optimization (SEO)](#search-engine-optimization-seo)
2447

48+
## Contribution Workflow
49+
50+
### For Documentation Updates (Non-Tutorials)
51+
52+
Follow these steps when contributing documentation fixes, improvements, or new content:
53+
54+
1. **Fork and Create Branch**
55+
```bash
56+
git clone https://github.com/your-username/polkadot-docs.git
57+
cd polkadot-docs
58+
git checkout -b your-feature-branch
59+
```
60+
61+
2. **Make Your Changes**
62+
- Edit existing files or add new content
63+
- Follow the [style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md)
64+
- Test your changes locally (see [Viewing Site Locally](#viewing-site-locally))
65+
66+
3. **Generate Updated AI Documentation**
67+
After making content changes, regenerate the AI-ready documentation files:
68+
```bash
69+
python scripts/generate_llms_standard.py
70+
```
71+
This updates the `llms.txt` and `llms-full.txt` files that power our AI-ready documentation.
72+
73+
4. **Create Pull Request**
74+
- Push your branch and create a pull request
75+
- Use the PR template to indicate your review preference
76+
- Include a clear description of your changes
77+
78+
5. **Review Process Choice**
79+
In your pull request, please let us know:
80+
- **Option A**: "I have time to handle formatting and style review feedback myself"
81+
- **Option B**: "Please have the Polkadot docs team take over for formatting review to expedite the process"
82+
83+
**If choosing Option B**: You must also enable "Allow edits from maintainers" when creating your PR (this option appears for PRs from forks). This allows our team to create a follow-up branch and handle style/formatting changes, letting you focus on the technical content.
84+
85+
### Hand-off Process (Internal Team Workflow)
86+
87+
When a contributor chooses Option B or becomes unresponsive during review:
88+
89+
1. **Create Intermediary Branch**: Create a new branch named `follow-up/PR-[original_pr_number]`
90+
2. **Redirect Original PR**: Change the destination of the original PR to the intermediary branch
91+
3. **Complete Formatting Review**: Perform style and formatting reviews on the intermediary branch
92+
4. **Final Merge**: Merge the completed intermediary branch into master
93+
94+
## Generating AI-Ready Documentation
95+
96+
When you modify content in the documentation, you should regenerate the AI-ready files to keep them current:
97+
98+
### Prerequisites
99+
- Python 3.x installed
100+
- Required Python packages (run `pip install -r requirements.txt` in the project root)
101+
102+
### Generate llms.txt Files
103+
```bash
104+
cd /path/to/polkadot-docs
105+
python scripts/generate_llms_standard.py
106+
```
107+
108+
This script will:
109+
- Generate `llms.txt` - A structured index of all documentation pages
110+
- Generate `llms-full.txt` - Full content of all documentation pages
111+
- Create category-specific files in the `llms-files/` directory
112+
113+
The generated files are automatically included in pull requests and help power AI tools that work with Polkadot documentation.
114+
25115
## Viewing Site Locally
26116

27117
You may want to spin up a local version of the documentation site to preview your changes. This guide will cover the steps needed to serve a local version.

0 commit comments

Comments
 (0)