matrix-spec/templating
Kegan Dougal 2e5809a68e Make build.py accept generic files for template var substitutions.
This allows us to incrementally convert sections of the spec to use this
templating system. E.g. './build.py ../specification/20_events.rst' where
that .rst file has {{room_events}} in it somewhere. Add ability to show
a list of valid template vars to use (e.g. room_events) by running
'./build.py --show-template-vars'.
2015-05-20 11:19:32 +01:00
..
internal Whitespace 2015-05-19 17:05:34 +01:00
templates Make build.py accept generic files for template var substitutions. 2015-05-20 11:19:32 +01:00
build.py Make build.py accept generic files for template var substitutions. 2015-05-20 11:19:32 +01:00
README.md Add templating folder and stub files/templates. 2015-05-19 11:22:33 +01:00

This folder contains the templates and templating system for creating the spec. We use the templating system Jinja2 in Python. This was chosen over other systems such as Handlebars.js and Templetor because we already have a Python dependency on the spec build system, and Jinja provides a rich set of template operations beyond basic control flow.

Installation

 $ pip install Jinja2

Running

To build the spec:

 $ python build.py

This will output spec.rst which can then be fed into the RST->HTML converter located in matrix-doc/scripts.