This repository contains the code and configuration used to generate sites for RAISE content which are hosted outside of Moodle. The repo uses Hugo to generate either student or teacher facing site content.
Developers will need to install Hugo. OS specific instructions can be found here.
The Hugo webserver can be used to preview content in a local dev environment:
$ hugo server -e students # Use -e teachers for teacher content
The output of the command will provide a local URL / port to access (typically http://localhost:1313/).
Content can be generated to ./public
using the Hugo
CLI:
$ rm -rf ./public # Cleanup existing files
$ hugo -e students # Use -e teachers for teacher content
The repo includes utility Python scripts that can be used to generate files for a new edition. Both scripts expect the CSV output generated from generate-mbz-toc.
$ pip install -r ./scripts/requirements.txt
$ python ./scripts/generate_content.py {path to ToC CSV} students ./content/students/{edition}/.
$ python ./scripts/generate_content.py {path to ToC CSV} teachers ./content/teachers/{edition}/.
$ python ./scripts/generate_toc.py {path to ToC CSV} students ./data/students/{edition}/toc.json
$ python ./scripts/generate_toc.py {path to ToC CSV} teachers ./data/teachers/{edition}/toc.json