diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-14 17:41:55 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-14 17:41:55 +0100 |
commit | 01a7c6f4e0e6518197b93ac350e73940197f22b4 (patch) | |
tree | 8d99c81177f00853d381e4b5cdec011ec1497be6 /docs/variables.md | |
parent | 0e86cdeb4a3af445700e8e3ebbdb245e16581c17 (diff) | |
download | gitbook-01a7c6f4e0e6518197b93ac350e73940197f22b4.zip gitbook-01a7c6f4e0e6518197b93ac350e73940197f22b4.tar.gz gitbook-01a7c6f4e0e6518197b93ac350e73940197f22b4.tar.bz2 |
Add help chapter about variables
Diffstat (limited to 'docs/variables.md')
-rw-r--r-- | docs/variables.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/variables.md b/docs/variables.md new file mode 100644 index 0000000..35c7dd7 --- /dev/null +++ b/docs/variables.md @@ -0,0 +1,43 @@ +# Variables + +The following is a reference of the available data during book's parsing and theme generation. + +### Global Variables + +| Variable | Description | +| -------- | ----------- | +| `book` | Bookwide information + configuration settings from `book.json`. See below for details. | +| `gitbook` | GitBook specific information | +| `page` | Current page specific information | +| `file` | File associated with the current page specific information | + +### Book Variables + +| Variable | Description | +| -------- | ----------- | +| `book.[CONFIGURATION_DATA]` | All the `variables` set via the `book.json` are available through the book variable. | + +### GitBook Variables + +| Variable | Description | +| -------- | ----------- | +| `gitbook.version` | Version of GitBook used to generate the book | + +### File Variables + +| Variable | Description | +| -------- | ----------- | +| `file.path` | The path to the raw page | +| `file.mtime` | Modified Time, Time when file data last modified | + +#### Page Variables + +| Variable | Description | +| -------- | ----------- | +| `page.title` | Title of the page | +| `page.previous` | Previous page in the Table of Contents (can be `null`) | +| `page.next` | Next page in the Table of Contents (can be `null`) | + + + + |