You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Follow the [PaperMoon Style Guide](https://github.com/papermoonio/documentation-style-guide)
27
30
- Test your changes locally (see [Running Polkadot Docs Locally](../README.md#run-polkadot-docs-locally))
28
31
29
32
3.**Update AI Documentation**
30
-
After making content changes, regenerate the AI-ready documentation files:
33
+
34
+
After making content changes, regenerate the AI-ready documentation files.
35
+
36
+
Set up your Python environment following the [Set Up Python Environment](./README.md#set-up-python-environment) section of the README, then run:
31
37
```bash
32
38
python3 scripts/generate_llms.py
33
39
```
34
40
**Note**: Run this script on every PR once all changes are committed.
35
41
36
42
4.**Create Pull Request**
43
+
37
44
- Push your branch and create a pull request
38
45
- Use the PR template to indicate your review preference
39
46
@@ -56,6 +63,7 @@ To add a page to an existing section:
56
63
1.**Create your markdown file** following [naming conventions](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md#naming-conventions)
57
64
58
65
2.**Include required frontmatter**:
66
+
59
67
```markdown
60
68
---
61
69
title: Page Title (max 60 chars for SEO)
@@ -76,6 +84,7 @@ To add a page to an existing section:
Copy file name to clipboardExpand all lines: README.md
+33-10Lines changed: 33 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ The documentation source files are written in [Markdown](https://daringfireball.
6
6
7
7
## Run Polkadot Docs Locally
8
8
9
-
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.
9
+
Follow these steps to run the documentation site locally and preview your changes.
10
10
11
11
### Clone Repositories
12
12
@@ -40,34 +40,57 @@ To set up the structure, follow these steps:
1. Now that the repositories are cloned and properly nested, use the [pip](https://pypi.org/project/pip/) package installer to install [mkdocs](https://www.mkdocs.org/) and other required dependencies by running the command:
45
+
Navigate to the `polkadot-mkdocs` directory and create a Python virtual environment:
46
46
47
-
```bash
48
-
pip install -r requirements.txt
49
-
```
47
+
```bash
48
+
cd polkadot-mkdocs
49
+
python -m venv venv
50
+
source venv/bin/activate # On Windows: venv\Scripts\activate
51
+
pip install -r requirements.txt
52
+
```
50
53
51
-
This command will install all dependencies listed in the `requirements.txt` file.
54
+
### Install Dependencies and Serve Site
52
55
53
-
2. Switch to the `polkadot-docs` directory and use [npm](https://docs.npmjs.com/about-npm) to install dependencies:
56
+
1. Install Node.js dependencies:
54
57
55
58
```bash
56
-
cd polkadot-docs && npm install
59
+
cd polkadot-docs && npm install&&cd ..
57
60
```
58
61
59
-
3. Navigate back to the `polkadot-mkdocs` folder, then build the site:
62
+
2. Serve the site:
60
63
61
64
```bash
62
65
mkdocs serve
63
66
```
64
67
65
68
After a successful build, the site should be available at http://127.0.0.1:8000.
66
69
70
+
### Deactivating the Virtual Environment
71
+
72
+
When you're done working on the documentation, you can deactivate the virtual environment by running:
73
+
74
+
```bash
75
+
deactivate
76
+
```
77
+
78
+
### Next Time You Work on the Docs
79
+
80
+
When you return to work on the documentation:
81
+
82
+
1. Navigate to the `polkadot-mkdocs` directory
83
+
2. Activate the virtual environment:
84
+
- macOS/Linux: `source venv/bin/activate`
85
+
- Windows: `venv\Scripts\activate`
86
+
3. Run `mkdocs serve` to start the development server
87
+
67
88
## Contributing
68
89
69
90
See [.CONTRIBUTING.md](./CONTRIBUTING.md) for how to contribute to this repository.
70
91
92
+
We're excited to have you contribute to the **Polkadot Docs** and help improve our ecosystem! 🚀 Every contribution, whether it's fixing a typo, improving documentation, or adding new content, helps make Polkadot more accessible to developers worldwide. Thank you for being part of our community! 🙏✨
0 commit comments