This repository contains the code and data of the VerCors website. It is generated as a set of static pages.
The website is built by build.py. To pull in the dependencies, e.g. set up a virtualenv:
$ virtualenv venv -p python3
$ source venv/bin/activate
$ pip3 install -r requirements.txtThen build the website:
$ python3 build.pyYou can also run a debug version of the website to inspect your edits, though it does not automatically update on save:
$ python3 test.py
Building the website...
Now serving on http://localhost:8000//buildcontains the statically rendered website after building;/generated_templatescontains generated jinja templates after building;/datacontains the website data structured as toml;/templatescontains html templates rendered with jinja2;/staticcontains other resources, and is copied as is.
Generally the process of building is as follows:
urlsis loaded from/data/urls.tomldatais constructed by loading the other files in/datapagescouples entries inurlsto template files/buildand/generated_templatesare deleted- The templates for the wiki and wiki menu are rendered into
/generated_templates - Everything in
pagesis rendered withdataas context, plus any additional arguments frompages- If the URL ends in
/,index.htmlis appended automatically
- If the URL ends in
/static/**/*is copied to/build
- Make a new entry in
/data/urls.toml - Make a new entry in
build.build.pages - If need be, load more data into
dataif you want a separate toml file in/data