This project has been replaced by the cs4teachers system, and has been archived.
This project generates the website for the CS4HS workshops held at the University of Canterbury, New Zealand located at cosc.canterbury.ac.nz/cs4hs.
Running generate.py
will produce all the necessary files for the website, that can be copied and placed on the appropriate web server. The script will generate HTML pages using Jinja2, and copy all images, files, css, and js into the output folder as well. This program is not as efficient in generation as the CSFG project, however it does get the job done.
cs4hs/
├── css/
│ └── Files to style the website output
├── files/
│ └── Files available for users to download through the website
├── img/
│ └── Images to display on the website
├── js/
│ └── JavaScript used in the website output
├── output/
│ └── Files and folders produced by the website generator (ignored by Git)
├── templates/
│ └── HTML files used by the template engine Jinja2
├── text/
│ └── HTML files used to create pages by the template engine Jinja2
├── .gitignore
├── generate.py
├── LICENSE
└── README.md
Over the past few years the CS4HS website has been created with 'hard coded' pages (created in the amazing Brackets). We now want to use a template engine to manage repetitive code, and this small Python script using Jinja2 achieves this. This project prepared us for the website creation aspect of the CSFG project.
- Switch to an existing static site generator (Middleman, Jekyll, etc)
Run generate.py
and the website will be located within the the output
folder.
- Python 3.4 or higher
- Jinja2 2.7.3 or higher (this is installed by the
generate.py
script if not installed already)
If you notice a problem, raise an issue here.
Forks and pull requests are welcome. We use Vincent Driessen's Git Branching Model for managing development.