summaryrefslogtreecommitdiffstats
path: root/docs/templating/builtin.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/templating/builtin.md')
-rw-r--r--docs/templating/builtin.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/templating/builtin.md b/docs/templating/builtin.md
new file mode 100644
index 0000000..1f05edf
--- /dev/null
+++ b/docs/templating/builtin.md
@@ -0,0 +1,18 @@
+# Builtin Templating Helpers
+
+GitBook provides a serie of builtin filters and blocks to help you write templates.
+
+### Filters
+
+`value|default(default, [boolean])`If value is strictly undefined, return default, otherwise value. If boolean is true, any JavaScript falsy value will return default (false, "", etc)
+
+`arr|sort(reverse, caseSens, attr)`
+Sort arr with JavaScript's arr.sort function. If reverse is true, result will be reversed. Sort is case-insensitive by default, but setting caseSens to true makes it case-sensitive. If attr is passed, will compare attr from each item.
+
+### Blocks
+
+`{% markdown %}Markdown string{% endmarkdown %}`
+Render inline markdown
+
+`{% asciidoc %}AsciiDoc string{% endasciidoc %}`
+Render inline asciidoc