|
1 |
| -# How to contribute to flaskcwg.github.io |
| 1 | +# Contributing to `flaskcwg.github.io` |
2 | 2 |
|
3 | 3 | ## Setup Instructions
|
4 | 4 |
|
5 |
| -* [Fork](https://github.com/flaskcwg/flaskcwg.github.io/fork) the repo |
6 |
| -* Clone your forked repo |
| 5 | +### 1. **Fork the Repository** |
| 6 | +- Navigate to the [repository's fork page](https://github.com/flaskcwg/flaskcwg.github.io/fork). |
| 7 | +- Click the "Fork" button to create a copy of the repository under your GitHub account. |
| 8 | + |
| 9 | +### 2. **Clone Your Forked Repository** |
| 10 | +- Clone your fork to your local machine: |
7 | 11 |
|
8 | 12 | ```bash
|
9 |
| - git https://github.com/{username}/flaskcwg.github.io.git |
| 13 | + git clone https://github.com/{username}/flaskcwg.github.io.git |
10 | 14 | cd flaskcwg.github.io
|
11 | 15 | ```
|
12 | 16 |
|
13 |
| -* Setup the upstream to original repo |
| 17 | +### 3. **Set Up the Upstream Remote** |
| 18 | +- Add the original repository as an upstream remote to keep your fork synchronized: |
14 | 19 |
|
15 | 20 | ```bash
|
16 | 21 | git remote add upstream https://github.com/flaskcwg/flaskcwg.github.io.git
|
17 | 22 | ```
|
18 | 23 |
|
19 |
| -* Create a virtual env and activate it |
20 |
| - |
21 |
| - For Linux/Mac: |
| 24 | +### 4. **Create and Activate a Virtual Environment** |
| 25 | +- **For Linux/Mac**: |
22 | 26 |
|
23 | 27 | ```bash
|
24 | 28 | python -m venv env
|
25 | 29 | source env/bin/activate
|
26 | 30 | ```
|
27 | 31 |
|
28 |
| - For Windows: |
| 32 | +- **For Windows**: |
29 | 33 |
|
30 | 34 | ```bash
|
31 | 35 | py -m venv env
|
32 | 36 | source env\Scripts\activate
|
33 | 37 | ```
|
34 | 38 |
|
35 |
| -* install dependencies |
| 39 | +### 5. **Install Dependencies** |
| 40 | +- Install the required Python dependencies: |
36 | 41 |
|
37 | 42 | ```bash
|
38 | 43 | pip install -r requirements.txt
|
39 | 44 | ```
|
40 | 45 |
|
41 |
| -* run `static.py`. This will build html content in `docs/` |
| 46 | +### 6. **Build the Static HTML Content** |
| 47 | +- Run the `static.py` script to generate the HTML content in the `docs/` directory: |
42 | 48 |
|
43 | 49 | ```bash
|
44 | 50 | python static.py
|
45 | 51 | ```
|
46 | 52 |
|
47 |
| -* run `serve.py`. Go to the IP address shown in the printout to view the generated site |
| 53 | +### 7. **Serve the Generated Site** |
| 54 | +- Serve the generated content locally by running the `serve.py` script: |
48 | 55 |
|
49 | 56 | ```bash
|
50 | 57 | cd docs
|
51 | 58 | python serve.py
|
52 | 59 | ```
|
53 | 60 |
|
54 |
| -* Add your fork as a remote to push your work to. Replace {username} with your username. This names the remote "fork", the default Pallets remote is "origin". |
| 61 | +- Access the site using the IP address displayed in the console output. |
| 62 | + |
| 63 | +### 8. **Push Your Changes to Your Fork** |
| 64 | +- Add your fork as a remote to push your contributions. Replace `{username}` with your GitHub username. This step names your forked repository remote as `fork` while retaining `origin` for the original repository: |
| 65 | + |
| 66 | + ```bash |
| 67 | + git remote add fork https://github.com/{username}/flaskcwg.github.io.git |
| 68 | + ``` |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +### Notes: |
| 73 | +- Ensure your fork is updated with the upstream repository before starting new work by running: |
| 74 | + ```bash |
| 75 | + git fetch upstream |
| 76 | + git merge upstream/main |
| 77 | + ``` |
| 78 | +- Submit your contributions via a pull request after committing your changes to your forked repository. |
| 79 | + |
| 80 | +By following these instructions, you'll be able to set up your environment and contribute effectively. Happy coding! 🎉 |
0 commit comments