docs-matrix-spec/templating
Kegan Dougal 96671ce833 Use the templating system to set {{git_version}}. Restructure sections code.
Restructured the sections code to be slightly more encapsulated than before.
This will be expanded to more clearly separate the templating system from
the specific implementation of the spec templates.
2015-05-26 14:33:32 +01:00
..
internal Use the templating system to set {{git_version}}. Restructure sections code. 2015-05-26 14:33:32 +01:00
templates Sort out table layout and rejig where state_key is placed. 2015-05-26 10:40:04 +01:00
build.py Account for 'required' text when wrapping desc column. 2015-05-21 11:27:54 +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.