Minor tweaks

This commit is contained in:
Kegsay 2015-05-26 17:14:50 +01:00
parent 89083b3a86
commit 2a02b3494f

View file

@ -40,7 +40,8 @@ with the text `foobar`, you need to add a new Section:
def render_foo_bar(self): def render_foo_bar(self):
return "foobar" return "foobar"
``` ```
- Run `build.py` with a file which has `{{foo_bar}}` in it. - Run `build.py` with a file which has `{{foo_bar}}` in it, and it will be
replaced with `foobar`.
### Adding data for template variables ### Adding data for template variables
If you want to expose arbitrary data which can be used by `MatrixSections`, you If you want to expose arbitrary data which can be used by `MatrixSections`, you
@ -59,8 +60,8 @@ need to add a new Unit:
"types": "it doesn't even need to be a dict. Whatever you want!" "types": "it doesn't even need to be a dict. Whatever you want!"
} }
``` ```
- You can now call `self.units.get("some_data")` to retrieve the value you - In `MatrixSections`, you can now call `self.units.get("some_data")` to
returned. retrieve the value you returned.
### Using Jinja templates ### Using Jinja templates
Sections can use Jinja templates to return text. Batesian will attempt to load Sections can use Jinja templates to return text. Batesian will attempt to load