diff options
Diffstat (limited to 'docs/templating')
-rw-r--r-- | docs/templating/README.md | 4 | ||||
-rw-r--r-- | docs/templating/builtin.md | 3 | ||||
-rw-r--r-- | docs/templating/variables.md | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/docs/templating/README.md b/docs/templating/README.md index bf8d265..ae4ec8f 100644 --- a/docs/templating/README.md +++ b/docs/templating/README.md @@ -21,7 +21,7 @@ This looks up username from the context and displays it. Variable names can have If a value is undefined, nothing is displayed. The following all output nothing if foo is undefined: `{{ foo }}`, `{{ foo.bar }}`, `{{ foo.bar.baz }}`. -GitBook provides a set of [predefined variables](variables.md) from the context. +GitBook provides a set of [predefined variables](variables.md) from the context. ### Filters @@ -92,7 +92,7 @@ Inclusion and inheritance is detailled in the [Content References](conrefs.md) s If you want GitBook to ignore any of the special templating tags, you can use raw and anything inside of it will be output as plain text. -``` twig +```twig {% raw %} this will {{ not be processed }} {% endraw %} diff --git a/docs/templating/builtin.md b/docs/templating/builtin.md index 1f05edf..780b0c9 100644 --- a/docs/templating/builtin.md +++ b/docs/templating/builtin.md @@ -4,7 +4,8 @@ GitBook provides a serie of builtin filters and blocks to help you write templat ### 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) +`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. diff --git a/docs/templating/variables.md b/docs/templating/variables.md index 9499c8e..1a215de 100644 --- a/docs/templating/variables.md +++ b/docs/templating/variables.md @@ -28,7 +28,7 @@ The following is a reference of the available data during book's parsing and the | Variable | Description | | -------- | ----------- | -| `gitbook.time` | The current time (when you run the `gitbook` command) . | +| `gitbook.time` | The current time (when you run the `gitbook` command). | | `gitbook.version` | Version of GitBook used to generate the book | ### File Variables |