Skip to content

Commit 2e52217

Browse files
committing new run script
1 parent dab67ae commit 2e52217

File tree

2 files changed

+43
-52
lines changed

2 files changed

+43
-52
lines changed

README.md

Lines changed: 36 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11
# Polygon Knowledge Layer
22

3-
Welcome to the Polygon Knowledge Layer! 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:
3+
Welcome to the Polygon Knowledge Layer.
4+
5+
These docs use [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 Polygon's technology.
6+
7+
This includes sections on:
48

59
- Polygon CDK
610
- Polygon zkEVM
711
- Polygon PoS
812
- Polygon Miden
9-
- Dev Tools
13+
- Developer tools
14+
15+
## Run locally
16+
17+
### Prerequisites
18+
19+
1. [Python 3.12](https://www.python.org/downloads/).
20+
2. [`virtualenv`](https://pypi.org/project/virtualenv/): Install using `pip3 install virtualenv`.
21+
22+
### Setup
23+
24+
1. Clone the repository.
25+
2. cd to the root.
26+
3. Run the `run.sh` script. You may need to make the script executable: `chmod +x run.sh`
27+
28+
```sh
29+
./run.sh
30+
```
31+
32+
The site comes up at http://127.0.0.1:8000/
33+
34+
### Docker
1035

11-
In addition, we include top-level sections for Tools and Tutorials to support developers in their journey with Polygon technology.
36+
If you prefer Docker, you can build and run the site using the following commands:
37+
38+
```sh
39+
docker build -t polygon-docs .
40+
docker compose up
41+
```
1242

1343
## Contributing
1444

@@ -34,58 +64,12 @@ In addition, we include top-level sections for Tools and Tutorials to support de
3464
- **Engage with the community**: Participate in discussions and provide feedback on other contributions.
3565
- **Stay consistent**: Ensure your contributions are coherent with the rest of the documentation and do not overlap or contradict existing content.
3666

37-
38-
## Running locally
39-
40-
### Prerequisites
41-
42-
Before running the site locally, you need to have the following installed:
43-
44-
1. [Python 3](https://www.python.org/downloads/).
45-
2. [`virtualenv`](https://pypi.org/project/virtualenv/): Install using `pip3 install virtualenv`.
46-
47-
### Setup
48-
49-
1. **Clone repository**: Clone the Polygon Knowledge Layer repository to your local machine.
50-
2. **Create a virtual environment**: Run `virtualenv venv; source venv/bin/activate` in the root directory.
51-
3. **Install dependencies**: Install required Python packages with `pip3 install -r requirements.txt`.
52-
53-
### Running the website
54-
55-
Before running the website, you'll need to first load the Python virtual environment in your current shell. To do this, type the following (depending on your shell):
56-
57-
- **Bash**, **zsh** (most common): `virtualenv venv; source venv/bin/activate`
58-
- **Fish**: `virtualenv venv; source venv/bin/activate.fish`
59-
- **Nu**: `virtualenv venv; source venv/bin/activate.nu`
60-
61-
You only need to do the above once per shell session. Then, pick one of the following:
62-
63-
1. **MkDocs in strict mode**: Use `mkdocs serve --strict` for a production-like environment.
64-
2. **MkDocs in normal mode**: Use `mkdocs serve` for a less strict, more forgiving environment, suitable for debugging.
65-
66-
### Docker alternative
67-
68-
If you prefer Docker, you can build and run the site using the following commands:
69-
70-
```sh
71-
docker build -t polygon-docs .
72-
docker compose up
73-
```
74-
75-
## Automated deployments
76-
77-
This repository uses GitHub Actions to automate some deployments from certain branches, which is useful for testing:
78-
79-
- **`main`**: Staging branch. Changes are deployed per-commit to https://docs-staging.polygon.technology.
80-
- **`dev`**: Experimental branch. Updates with `main` every 24 hours. Changes are deployed per-commit to https://docs-dev.polygon.technology.
81-
82-
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.
83-
8467
## Contact and support
8568

86-
For any queries or support, please open a ticket at https://support.polygon.technology/support/home.
69+
- For docs issues (technical or language) open an issue here.
70+
- For technical issues with the software, either raise an issue here and we will follow up, or check https://support.polygon.technology/support/home.
8771

88-
## Current Technical Knowledge Documentation (TKD) team members
72+
## The team
8973

9074
- Anthony Matlala (@EmpieichO)
9175
- Katharine Murphy (@kmurphypolygon)

run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
virtualenv venv
5+
source venv/bin/activate
6+
pip3 install -r requirements.txt
7+
mkdocs serve --strict

0 commit comments

Comments
 (0)