A Python app that generates HTML pages using JSON data and Jinja2 templates. Features a Flask development server for live preview and GitHub Actions for automated static HTML generation. The deployed pages are will be available at https://codekitchen.community/<page_name>.
/
├── templates/
│ ├── base.html # Main template structure
│ └── readme/ # Page-specific templates
│ ├── index.html
│ ├── readme_section.html
│ ├── readme_section_zh.html
│ ├── conduct_section.html
│ └── conduct_section_zh.html
├── readme/ # Example page folder
│ ├── content.json # Page content data
│ ├── style.css # Page-specific CSS
│ ├── script.js # Page-specific JavaScript
│ └── body.html # Generated output (with inline CSS/JS)
├── app.py # Flask development server
├── generate.py # Standalone generator script
└── requirements.txt # Dependencies
Clone the repository and install dependencies:
git clone https://github.com/codekitchen-community/pages.git
cd pages
pip install -r requirements.txtpython app.py
# or
FLASK_APP=app.py flask runAccess at:
http://localhost:8000/- Redirect to first pagehttp://localhost:8000/pages- List all pageshttp://localhost:8000/readme- View specific page
Static HTML generation is handled automatically by GitHub Actions when you push to the main branch.
For manual generation:
# Generate all pages (standalone script)
python generate.py
# Generate specific page
python generate.py readme# Create new page
FLASK_APP=app.py flask new-page blogEach page needs:
content.json- Page content and configurationstyle.css- Page-specific stylesscript.js- Page-specific JavaScript- Templates in
templates/{page_name}/folder