summaryrefslogtreecommitdiffstats
path: root/mustache-templates/README
diff options
context:
space:
mode:
authorValerie R Young <spectranaut@riseup.net>2016-07-29 15:54:00 -0400
committerHolger Levsen <holger@layer-acht.org>2016-07-29 16:01:56 -0400
commit8cdd0f8eecb4086cac324d8cf44ccac3d4b39190 (patch)
tree36c5b233ff6e785731d91dff9f479d59de84b4ea /mustache-templates/README
parent27bc54e6adc58208ce030336ebcbdaa51d4ac721 (diff)
downloadjenkins.debian.net-8cdd0f8eecb4086cac324d8cf44ccac3d4b39190.tar.xz
reproducible debian: add README to mustache directory
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'mustache-templates/README')
-rw-r--r--mustache-templates/README26
1 files changed, 26 insertions, 0 deletions
diff --git a/mustache-templates/README b/mustache-templates/README
new file mode 100644
index 00000000..c812e2a5
--- /dev/null
+++ b/mustache-templates/README
@@ -0,0 +1,26 @@
+mustache is a templating language with the following simple rules.
+The template accepts a "context" -- a python dictionary. Values can be
+Booleans, strings, numbers, html, and lists of dictionaries. Empty stings,
+None and False values are interpreted as false.
+
+See complete description here: https://mustache.github.io/mustache.5.html
+
+Syntax:
+{{foo}}
+ -> subsitute with the value of foo
+
+{{#foo}}some html{{/foo}}
+ -> if foo exists and it's value is not false, include "some html"
+
+{{^foo}}some html{{/foo}}
+ -> if foo does not exists or it's value is false, include "some html"
+
+{{#foo}}{{^bar}}some html{{/bar}}{{/foo}}
+ -> if foo exists and bar does not exist, include "some html"
+
+{{#items}}<ul>{{item}}</ul>{{/items}}
+ -> if context['items'] is a list of dictionaries, repeat the html between
+ the "items" tags using each object as the context iteratively.
+
+{{{additional_html}}}
+ -> three "{" must be used to pass html into a template