diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-12-22 10:17:28 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-12-22 10:17:28 +0100 |
commit | 16af264360e48e8a833e9efa9ab8d194574dbc70 (patch) | |
tree | c50988f32ccf18df93ae7ab40be78e9459642818 /docs/templating | |
parent | febdd8a8bd26466509d03fe2d95aff97e7631c2f (diff) | |
parent | 64ccb6b00b4b63fa0e516d4e35351275b34f8c07 (diff) | |
download | gitbook-16af264360e48e8a833e9efa9ab8d194574dbc70.zip gitbook-16af264360e48e8a833e9efa9ab8d194574dbc70.tar.gz gitbook-16af264360e48e8a833e9efa9ab8d194574dbc70.tar.bz2 |
Merge branch 'master' into dream
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 |