From f2a69735b4400f81f4849eb372f4d1a536c05b75 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Sat, 8 Aug 2020 21:24:04 -0500 Subject: [PATCH] Add documentation for ESH templates --- _docs/070_templates.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/_docs/070_templates.md b/_docs/070_templates.md index 8e2c725..d8f1f6c 100644 --- a/_docs/070_templates.md +++ b/_docs/070_templates.md @@ -25,6 +25,7 @@ The supported template processors are: | Processor | Suffixes | Dependencies | | - | - | - | | default | `##template`, `##template.default` | `awk` must be installed. (This should be installed on all *nix systems) | +| esh | `##template.esh` | `esh` must be installed. | | j2cli | `##template.j2`, `##template.j2cli` | `j2cli` must be installed. | | envtpl | `##template.j2`, `##template.envtpl` | `envtpl` must be installed. | @@ -36,7 +37,7 @@ Also, `j2` will be processed by either j2cli or envtpl, whichever is found. When template processors run, they will be provided the following set of data. -| Default (built-in) | Jinja | Description | Source | +| Default (built-in) | Jinja or ESH | Description | Source | | - | - | - | - | | `yadm.class` | `YADM_CLASS` | Locally defined yadm class | yadm config local.class | | `yadm.distro` | `YADM_DISTRO` | Distribution | lsb_release ‑si
or /etc/os-release | @@ -60,6 +61,11 @@ contains `awk`). This processor has a syntax _similar_ to the Jinja processors below, however it only supports a small set of directives. Those directives are detailed in the section below. +esh +: [esh][esh] is a template processor written in POSIX compliant shell. It allows +executing shell commands within templates. This can be used to reference +your own configurations within templates, for example: + j2cli : [j2cli][j2cli] (or `j2`) is a Python-based Jinja2 template processor. This fully supports all directives of the [Jinja2 library][jinja]. When your template is @@ -103,5 +109,6 @@ This block is included for any other OS {% endraw %} [envtpl]: https://github.com/andreasjansson/envtpl +[esh]: https://github.com/jirutka/esh [j2cli]: https://github.com/kolypto/j2cli [jinja]: https://jinja.palletsprojects.com