1+
12# Flask Community Workgroup
23
34## Setup Instructions
45
5- 1 . ** Fork the repository **
6- [ Fork the repo] ( https://github.com/flaskcwg/flaskcwg.github.io/fork )
6+ ### 1. ** Fork the Repository **
7+ - [ Fork the repo] ( https://github.com/flaskcwg/flaskcwg.github.io/fork ) to your GitHub account.
78
8- 2 . ** Clone your fork**
9+ ### 2. ** Clone Your Fork**
10+ - Clone your fork to your local machine:
911 ``` bash
1012 git clone https://github.com/{username}/flaskcwg.github.io.git
1113 cd flaskcwg.github.io
1214 ```
1315
14- 3. ** Set up upstream remote**
16+ # ## 3. **Set Up Upstream Remote**
17+ - Add the original repository as an upstream remote:
1518 ` ` ` bash
1619 git remote add upstream https://github.com/flaskcwg/flaskcwg.github.io.git
1720 ` ` `
1821
19- 4. ** Create and activate a virtual environment **
22+ # ## 4. **Create and Activate a Virtual Environment **
2023
21- - ** Linux/Mac** :
22- ` ` ` bash
23- python -m venv env
24- source env/bin/activate
25- ` ` `
24+ - ** Linux/Mac** :
25+ ` ` ` bash
26+ python -m venv env
27+ source env/bin/activate
28+ ` ` `
2629
27- - ** Windows** :
28- ` ` ` bash
29- py -m venv env
30- env\S cripts\a ctivate.bat # Command Prompt
31- # Or for Bash:
32- source env/Scripts/activate
33- ` ` `
30+ - ** Windows** :
31+ ` ` ` bash
32+ py -m venv env
33+ env\S cripts\a ctivate.bat # For Command Prompt
34+ # Or for Bash:
35+ source env/Scripts/activate
36+ ` ` `
3437
35- 5. ** Install dependencies**
38+ # ## 5. **Install Dependencies**
39+ - Install the required dependencies:
3640 ` ` ` bash
3741 python -m pip install -r requirements.txt
3842 ` ` `
3943
40- 6. ** Build the HTML content**
44+ # ## 6. **Build the HTML Content**
45+ - Run the ` static.py` script to generate the HTML content:
4146 ` ` ` bash
4247 python static.py
4348 ` ` `
4449
45- 7. ** Serve the site**
50+ # ## 7. **Serve the Site**
51+ - Serve the site locally:
4652 ` ` ` bash
4753 cd docs
4854 python serve.py
4955 ` ` `
50- Access the site at the displayed IP address.
56+ - Access the site at the IP address displayed in the terminal .
5157
52- 8. ** View template changes**
53- To reflect updates in [` /templates` ](/templates), re-run ` python static.py` in a separate terminal, then refresh the browser.
58+ # ## 8. **View Template Changes**
59+ - To apply changes made in the ` /templates` directory:
60+ - Re-run ` python static.py` in a separate terminal.
61+ - Refresh the browser to see the updates.
62+
63+ ---
5464
5565# # Production Workflow
5666
57- Pull requests are merged into the source branch, which is automatically deployed to the ` gh-pages` branch.
67+ Pull requests are merged into the ` source` branch, which is automatically deployed to the ` gh-pages` branch.
68+
69+ ---
5870
59- # # How to add a new page?
71+ # # How to Add a New Page
6072
61- In ` static.py` , under ` generate` , add another ` generate` function :
73+ In the ` static.py` file , under the ` generate` function , add another ` generate` call, for example :
6274
6375` ` ` python
6476def main(args):
6577 def gen ():
6678 generate(' index.html' , join(settings.OUTPUT_FOLDER, ' index.html' ), ** context)
79+ generate(' source_file.html' , join(settings.OUTPUT_FOLDER, ' output_file.html' ), ** context)
6780` ` `
6881
6982Like this:
@@ -127,15 +140,15 @@ For translation, you have lang and coordinator, the latter being optional.
127140 " Some more lines" ],
128141` ` `
129142
130- ** retired:** If someomne is active or not.
143+ ** retired:** If someone is active or not.
131144
132145Links are generated as links with text as the key and link as the value.
133146
134147# ## Blog post
135148
136149A blog post occurs in the format:
137150
138- ` ` ` ` md
151+ ` ` ` ` markdown
139152title: Demo blog post
140153summary: A demo post
141154authors: jugmac00
@@ -154,9 +167,9 @@ def x():
154167And hence [link demo](https://flaskcwg.github.io)
155168````
156169
157- All meta keys are mandatory but summary can be kept empty
170+ All meta keys are mandatory but summary can be kept empty.
158171
159- Inside of ` data/blog` create a folder with the category you want. In ` settings.py` add it
172+ Inside of ` data/blog` create a folder with the category you want. In ` settings.py` add it:
160173
161174` ` ` python
162175BLOG_CATEGORIES = [
@@ -181,10 +194,9 @@ For authors, the author must occur in profiles.
181194
182195In ` data/faq` , create a ` .md` file with whatever name you want ` .md`
183196
184- The content should look like this
185-
197+ The content should look like this:
186198
187- ` ` ` ` md
199+ ` ` ` ` markdown
188200title: Demo faq question
189201tags: demo
190202 flask
0 commit comments