|
1 | | -# Polygon docs |
| 1 | +# Polygon Technical Docs |
2 | 2 |
|
3 | | -Welcome to the Polygon Docs website, built with [the Material theme for MkDocs](https://squidfunk.github.io/mkdocs-material/). |
| 3 | +Welcome to the Polygon Technical Docs! This documentation is built using [the Material theme for MkDocs](https://squidfunk.github.io/mkdocs-material/). Our goal is to establish a high-quality, curated, and comprehensive "source of truth" for technical knowledge surrounding Polygon's main technology. This includes detailed sections on: |
4 | 4 |
|
5 | | -## Instructions for use |
| 5 | +- Polygon CDK |
| 6 | +- Polygon zkEVM |
| 7 | +- Polygon PoS |
| 8 | +- Polygon Miden |
6 | 9 |
|
7 | | -Work on a local branch and request a review from a teammate. |
| 10 | +In addition, we include top-level sections for Tools and Tutorials to support developers in their journey with Polygon technology. |
8 | 11 |
|
9 | | -## How to run the site locally |
| 12 | +## Contributing |
10 | 13 |
|
11 | | -### Clone the repo |
| 14 | +### Getting started |
12 | 15 |
|
13 | | -```sh |
14 | | -git clone https://github.com/0xPolygon/polygon-docs.git |
15 | | -cd polygon-docs |
16 | | -``` |
| 16 | +1. **Fork and Branch**: Fork the `main` branch into your own GitHub account. Create a feature branch for your changes. |
| 17 | +2. **Make Changes**: Implement your changes or additions in your feature branch. |
| 18 | +3. **Contribution Quality**: Ensure that your contributions are: |
| 19 | + - **Atomic**: Small, self-contained, logical updates are preferred. |
| 20 | + - **Well Documented**: Use clear commit messages. Explain your changes in the pull request description. |
| 21 | + - **Tested**: Verify your changes do not break existing functionality. |
| 22 | + - **Styled Correctly**: Follow the [Microsoft Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/). |
17 | 23 |
|
18 | | -### Run with Python |
| 24 | +### Creating a pull request |
19 | 25 |
|
20 | | -1. Download and install Python 3.11: https://www.python.org/downloads/ |
| 26 | +1. **Pull Request**: Once your changes are complete, create a pull request against the main branch of Polygon Technical Docs. |
| 27 | +2. **Review Process**: Your pull request will be reviewed by the maintainers. They may request changes or clarifications. |
| 28 | +3. **Responsibility**: Contributors are expected to maintain their contributions over time and update them as necessary to ensure continued accuracy and relevance. |
21 | 29 |
|
22 | | -2. Install the `virtualenv` package: |
| 30 | +### Best practices |
23 | 31 |
|
24 | | -```sh |
25 | | -pip install virtualenv |
26 | | -``` |
| 32 | +- **Stay Informed**: Keep up-to-date with the latest developments in Polygon technologies. |
| 33 | +- **Engage with the Community**: Participate in discussions and provide feedback on other contributions. |
| 34 | +- **Stay Consistent**: Ensure your contributions are coherent with the rest of the documentation and do not overlap or contradict existing content. |
27 | 35 |
|
28 | | -3. Build and serve the html |
29 | 36 |
|
30 | | -```sh |
31 | | -./run.sh |
32 | | -``` |
| 37 | +## Running locally |
| 38 | + |
| 39 | +### Prerequisites |
| 40 | + |
| 41 | +Before running the site locally, you need to have the following installed: |
33 | 42 |
|
34 | | -The site runs at: http://127.0.0.1:8000/ |
| 43 | +1. [Python 3](https://www.python.org/downloads/). |
| 44 | +2. [`virtualenv`](https://pypi.org/project/virtualenv/): Install using `pip3 install virtualenv`. |
35 | 45 |
|
36 | | -### Run with Docker |
| 46 | +### Setup |
37 | 47 |
|
38 | | -1. Run the following commands from the project root: |
| 48 | +1. **Clone Repository**: Clone the Polygon Technical Docs repository to your local machine. |
| 49 | +2. **Create a Virtual Environment**: Run `virtualenv venv; source venv/bin/activate` in the root directory. |
| 50 | +3. **Install Dependencies**: Install required Python packages with `pip3 install -r requirements.txt`. |
| 51 | + |
| 52 | +### Running the Website |
| 53 | + |
| 54 | +1. **MkDocs in Strict Mode**: Use `mkdocs serve --strict` for a production-like environment. |
| 55 | +2. **MkDocs in Normal Mode**: Use `mkdocs serve` for a less strict, more forgiving environment, suitable for debugging. |
| 56 | + |
| 57 | +### Docker Alternative |
| 58 | + |
| 59 | +If you prefer Docker, you can build and run the site using the following commands: |
39 | 60 |
|
40 | 61 | ```sh |
41 | 62 | docker build -t polygon-docs . |
42 | 63 | docker compose up |
43 | 64 | ``` |
44 | 65 |
|
45 | | -### Run manually |
| 66 | +## Automated deployments |
46 | 67 |
|
47 | | -1. Download and install Python, as above, and ensure you have installed all the packages listed in `requirements.txt`, e.g.: |
| 68 | +This repository uses GitHub Actions to automate some deployments from certain branches, which is useful for testing: |
48 | 69 |
|
49 | | -```sh |
50 | | -pip install markdown-include==0.8.1 |
51 | | -``` |
| 70 | +- **`main`**: Staging branch. Changes are deployed per-commit to https://docs-staging.polygon.technology. |
| 71 | +- **`dev`**: Experimental branch. Updates with main every 24 hours. Changes are deployed per-commit to https://docs-dev.polygon.technology. |
52 | 72 |
|
53 | | -2. Run the following from the project root to bring up the site: |
| 73 | +Whenever we are happy with `main`, a trigger can be manually done through GitHub Actions which deploys staging to production at https://docs.polygon.technology. |
54 | 74 |
|
55 | | -```sh |
56 | | -mkdocs serve --strict |
57 | | -``` |
| 75 | +## Contact and support |
58 | 76 |
|
59 | | -## Questions |
| 77 | +For any queries or support, join our Polygon Slack channel at `#disc_tkd_techdocs`. Current team members: |
60 | 78 |
|
61 | | -Feel free to contact the team any time: `#disc_tkd_techdocs` |
| 79 | +- Nadim Kobeissi (@nadimkobeissi) |
| 80 | +- Anthony Matlala (@EmpieichO) |
| 81 | +- Katharine Murphy (@kmurphypolygon) |
| 82 | +- Grace Torrellas (@0xgraciegrace) |
0 commit comments