diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:41:26 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:41:26 +0100 |
commit | d3d64f636c859f7f01a64f7774cf70bd8ccdc562 (patch) | |
tree | 4f7731f37c3a793d187b0ab1cd77680e69534c6c /docs | |
parent | 4cb9cbb5ae3aa8f9211ffa3ac5e3d34232c0ca4f (diff) | |
parent | eef072693b17526347c37b66078a5059c71caa31 (diff) | |
download | gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.zip gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.gz gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.bz2 |
Merge pull request #1109 from GitbookIO/3.0.0
Version 3.0.0
Diffstat (limited to 'docs')
-rw-r--r-- | docs/README.md | 22 | ||||
-rw-r--r-- | docs/SUMMARY.md | 33 | ||||
-rw-r--r-- | docs/_layouts/website/page.html | 23 | ||||
-rw-r--r-- | docs/asciidoc.md | 60 | ||||
-rw-r--r-- | docs/book.js | 11 | ||||
-rw-r--r-- | docs/config.md | 37 | ||||
-rw-r--r-- | docs/conrefs.md | 55 | ||||
-rw-r--r-- | docs/faq.md | 33 | ||||
-rw-r--r-- | docs/languages.md | 15 | ||||
-rw-r--r-- | docs/lexicon.md | 13 | ||||
-rw-r--r-- | docs/pages.md | 50 | ||||
-rw-r--r-- | docs/plugins.md | 26 | ||||
-rw-r--r-- | docs/setup.md | 45 | ||||
-rw-r--r-- | docs/structure.md | 62 | ||||
-rw-r--r-- | docs/templating.md | 90 | ||||
-rw-r--r-- | docs/themes.md | 26 | ||||
-rw-r--r-- | docs/variables.md | 64 |
17 files changed, 665 insertions, 0 deletions
diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..6febb43 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,22 @@ +# GitBook Format Documentation + +> This documentation is for GitBook version **{{ book.version }}** + +GitBook is a command line tool (and Node.js library) for building beautiful books using GitHub/Git and Markdown (or AsciiDoc). Here is an example: [Learn Javascript](https://www.gitbook.com/book/GitBookIO/javascript). This documentation has been generated using GitBook. + +GitBook can output your content as a website ([customizable](themes.md) and [extensibles](plugins.md)) or as an ebook (PDF, ePub or Mobi). + +[GitBook.com](https://www.gitbook.com) is the online platform to create and host books built using the GitBook format. It offers hosting, collaboration features and an [easy-to-use editor](https://www.gitbook.com/editor). + +### Help and Support + +We're always happy to help out with your books or any other questions you might have. You can ask a question on the following contact form at [gitbook.com/contact](https://www.gitbook.com/contact) or signal an issue on [GitHub](https://github.com/GitbookIO/gitbook). + +### FAQ + +There are questions that are asked quite often, [check this out before creating an issue](faq.md). + +### Contribute to this documentation + +You can contribute to improve this documentation on [GitHub](https://github.com/GitbookIO/gitbook) by signaling issues or proposing changes. + diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..a304801 --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,33 @@ +# Summary + +### Getting Started + +* [About this documentation](README.md) +* [Installation and Setup](setup.md) + +### Your Content + +* [Directory structure](structure.md) +* [Pages and Summary](pages.md) +* [Glossary](lexicon.md) +* [Multi-Lingual](languages.md) +* [Configuration](config.md) +* [AsciiDoc](asciidoc.md) + +### Miscellaneous + +* [Templating](templating.md) +* [Content References](conrefs.md) +* [Variables](variables.md) + +### Customization + +* [Plugins](plugins.md) +* [Theming](themes.md) + +-- + +* [FAQ](faq.md) +* [Release notes](https://github.com/GitbookIO/gitbook/blob/master/CHANGES.md) + + diff --git a/docs/_layouts/website/page.html b/docs/_layouts/website/page.html new file mode 100644 index 0000000..a673a48 --- /dev/null +++ b/docs/_layouts/website/page.html @@ -0,0 +1,23 @@ +{% extends template.theme %} + +{% block header_nav %} +<a href="https://github.com/GitbookIO/gitbook/blob/master/docs/{{ file.path }}" target="_blank" class="btn btn-link pull-right hidden-xs"> + <i class="octicon octicon-mark-github"></i> Edit on GitHub +</a> +<a href="https://github.com/GitbookIO/gitbook/blob/master/CHANGES.md" target="_blank" class="btn btn-link pull-right hidden-xs"> + {{ book.version }} +</a> +{% endblock %} + +{% block page %} +{{ super() }} +<hr> +<div class="btn-group btn-group-justified"> + {% if page.previous and page.previous.path %} + <a class="btn" href="{{ page.previous.path|resolveFile }}"><b>Previous:</b> {{ page.previous.title }}</a> + {% endif %} + {% if page.next and page.next.path %} + <a class="btn" href="{{ page.next.path|resolveFile }}"><b>Next:</b> {{ page.next.title }}</a> + {% endif %} +</div> +{% endblock %} diff --git a/docs/asciidoc.md b/docs/asciidoc.md new file mode 100644 index 0000000..6fe0dec --- /dev/null +++ b/docs/asciidoc.md @@ -0,0 +1,60 @@ +# AsciiDoc + +Since version `2.0.0`, GitBook can also accept AsciiDoc as an input format. + +Please refer to the [AsciiDoc Syntax Quick Reference](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) for more informations about the format. + +Just like for markdown, GitBook is using some special files to extract structures: `README.adoc`, `SUMMARY.adoc`, `LANGS.adoc` and `GLOSSARY.adoc`. + +### README.adoc + +This is the main entry of your book: the introduction. This file is **non optional**. + +### SUMMARY.adoc + +This file defines the list of chapters and subchapters. Just like [for markdown](./pages.md), the `SUMMARY.adoc`'s format is simply a list of links, the name of the link is used as the chapter's name, and the target is a path to that chapter's file. + +Subchapters are defined simply by adding a nested list to a parent chapter. + +```asciidoc += Summary + +. link:chapter-1/README.adoc[Chapter 1] +.. link:chapter-1/ARTICLE1.adoc[Article 1] +.. link:chapter-1/ARTICLE2.adoc[Article 2] +... link:chapter-1/ARTICLE-1-2-1.adoc[Article 1.2.1] +. link:chapter-2/README.adoc[Chapter 2] +. link:chapter-3/README.adoc[Chapter 3] +. link:chapter-4/README.adoc[Chapter 4] +.. Unfinished article +. Unfinished Chapter +``` + +### LANGS.adoc + +For [Multi-Languages](./languages.md) books, this file is used to define the different supported languages and translations. + +This file is following the same syntax as the `SUMMARY.adoc`: + +```asciidoc += Languages + +. link:en/[English] +. link:fr/[French] +``` + +### GLOSSARY.adoc + +This file is used to define terms. [See the glossary section](./lexicon.md). + +```asciidoc += Glossary + +== Magic +Sufficiently advanced technology, beyond the understanding of the observer producing a sense of wonder. + +== PHP +An atrocious language, invented for the sole purpose of inflicting pain and suffering amongst the programming wizards of this world. +``` + + diff --git a/docs/book.js b/docs/book.js new file mode 100644 index 0000000..988abb2 --- /dev/null +++ b/docs/book.js @@ -0,0 +1,11 @@ +var pkg = require('../package.json'); + +module.exports = { + title: 'GitBook Documentation', + + plugins: ['theme-official'], + theme: 'official', + variables: { + version: pkg.version + } +}; diff --git a/docs/config.md b/docs/config.md new file mode 100644 index 0000000..060a9d0 --- /dev/null +++ b/docs/config.md @@ -0,0 +1,37 @@ +# Configuration + +GitBook allows you to customize your book using a flexible configuration. These options are specified in a `book.json` file. + +### Configuration Settings + +| Variable | Description | +| -------- | ----------- | +| `title` | Title of your book, default value is extracted from the README. On GitBook.com this field is pre-filled. | +| `description` | Description of your book, default value is extracted from the README. On GitBook.com this field is pre-filled. | +| `author` | Name of the author. On GitBook.com this field is pre-filled. | +| `isbn` | ISBN of the book | +| `language` | ISO code of the book's language, default value is `en` | +| `direction` | `rtl` or `ltr`, default value depends on the value of `language` | +| `gitbook` | [SemVer](http://semver.org) condition to validate which GitBook version should be used | +| `plugins` | List of plugins to load, See [the plugins section](plugins.md) for more details | +| `pluginsConfig` |Configuration for plugins, See [the plugins section](plugins.md) for more details | + +### PDF Options + +PDF Output can be customized using a set of options in the `book.json`: + +| Variable | Description | +| -------- | ----------- | +| `pdf.pageNumbers` | Add page numbers to the bottom of every page (default is `true`) | +| `pdf.fontSize` | Base font size (default is `12`) | +| `pdf.fontFamily` | Base font family (default is `Arial`) | +| `pdf.paperSize` | Paper size, options are `'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'legal', 'letter'` (default is `a4`) | +| `pdf.margin.top` | Top margin (default is `56`) | +| `pdf.margin.bottom` | Bottom margin (default is `56`) | +| `pdf.margin.right` | Right margin (default is `62`) | +| `pdf.margin.left` | Left margin (default is `62`) | + +### Plugins + +Plugins and their configurations are specified in the `book.json`. See [the plugins section](plugins.md) for more details. + diff --git a/docs/conrefs.md b/docs/conrefs.md new file mode 100644 index 0000000..7844e9c --- /dev/null +++ b/docs/conrefs.md @@ -0,0 +1,55 @@ +# Content References + +Content referencing (conref) is a convenient mechanism for reuse of content from other files or books. + +### Importing local files + +Importing an other file's content is really easy using the `include` tag: + +``` +{% include "./test.md" %} +``` + +### Importing file from another book + +GitBook can also resolve the include path by using git: + +``` +{% include "git+https://github.com/GitbookIO/documentation.git/README.md#0.0.1" %} +``` + +The format of git url is: + +``` +git+https://user@hostname/project/blah.git/file#commit-ish +``` + +The real git url part should finish with `.git`, the filename to import is extracted after the `.git` till the fragment of the url. + +The `commit-ish` can be any tag, sha, or branch which can be supplied as an argument to `git checkout`. The default is `master`. + +### Inheritance + +Template inheritance is a way to make it easy to reuse templates. When writing a template, you can define "blocks" that child templates can override. The inheritance chain can be as long as you like. + +`block` defines a section on the template and identifies it with a name. Base templates can specify blocks and child templates can override them with new content. + +``` +{% extends "./mypage.md" %} + +{% block pageContent %} +# This is my page content +{% endblock %} +``` + +In the file `mypage.md`, you should specify the blocks that can be extent: + +``` +{% block pageContent %} +This is the default content +{% endblock %} + +# License + +{% import "./LICENSE" %} +``` diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 0000000..42de8fe --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,33 @@ +# GitBook FAQ + +#### How can I host/publish my book? + +Books can easily be published and hosted on [GitBook.com](https://www.gitbook.com). But GitBook output can be hosted on any static file hosting solution. + +#### What can I use to edit my content? + +Any text editor should work! But we advise using the [GitBook Editor](https://www.gitbook.com/editor). [GitBook.com](https://www.gitbook.com) also provides a web version of this editor. + +--- + +#### Should I use an `.html` or `.md` extensions in my links? + +You should always use `.md` extensions for your relative links, GitBook will automatically replace these links by the right value when the pointing file is referenced in the Table of Contents. + +#### Can I create a GitBook in a sub-directory of my repository? + +Yes, GitBooks can be created in [sub-directories](structure.md#subdirectory). GitBook.com and the CLI also looks by default in a serie of [folders](structure.md). + +--- + +#### Does GitBook support Math equations? + +GitBook supports math equations and TeX thanks to plugins. There are currently 2 official plugins to display math: [mathjax](https://plugins.gitbook.com/plugin/mathjax) and [katex](https://plugins.gitbook.com/plugin/katex). + +#### Can I customize/theme the output? + +Yes, both the website and ebook outputs can be customized using [themes](themes.md). + +#### Can I add interactive content (videos, etc)? + +GitBook is very [extensible](plugins.md). You can use [existing plugins](https://plugins.gitbook.com) or create your own! diff --git a/docs/languages.md b/docs/languages.md new file mode 100644 index 0000000..9a866be --- /dev/null +++ b/docs/languages.md @@ -0,0 +1,15 @@ +# Multi-Languages + +GitBook supports building books written in multiple languages. Each language should be a sub-directory following the normal GitBook format, and a file named `LANGS.md` should be present at the root of the repository with the following format: + +```markdown +* [English](en/) +* [French](fr/) +* [Español](es/) +``` + +### Configuration for each language + +When a language book (ex: `en`) has a `book.json`, its configuration will extend the main configuration. + +The only exception is plugins, plugins are specify globally relative to the book, and language specific plugins can not be specified. diff --git a/docs/lexicon.md b/docs/lexicon.md new file mode 100644 index 0000000..5d356b4 --- /dev/null +++ b/docs/lexicon.md @@ -0,0 +1,13 @@ +# Glossary + +Allows you to specify terms and their respective definitions to be displayed as annotations. Based on those terms, gitbook will automatically build an index and highlight those terms in pages. + +The `GLOSSARY.md` format is very simple : + +```markdown +# Term +Definition for this term + +# Another term +With it's definition, this can contain bold text and all other kinds of inline markup ... +```
\ No newline at end of file diff --git a/docs/pages.md b/docs/pages.md new file mode 100644 index 0000000..8ffa054 --- /dev/null +++ b/docs/pages.md @@ -0,0 +1,50 @@ +# Pages and Summary + +GitBook uses a `SUMMARY.md` file to define the structure of chapters and subchapters of the book. The `SUMMARY.md` file is used to generate the book's table of contents. + +### Summary + +The `SUMMARY.md`'s format is simply a list of links, the title of the link is used as the chapter's title, and the target is a path to that chapter's file. + +Subchapters are defined simply by adding a nested list to a parent chapter. + +##### Simple example + +```markdown +# Summary + +* [Part I](part1/README.md) + * [Writing is nice](part1/writing.md) + * [GitBook is nice](part1/gitbook.md) +* [Part II](part2/README.md) + * [We love feedback](part2/feedback_please.md) + * [Better tools for authors](part2/better_tools.md) +``` + +##### Example with subchapters split into parts + +```markdown +# Summary + +### Part 1 + +* [Writing is nice](part1/writing.md) +* [GitBook is nice](part1/gitbook.md) + +### Part 2 + +* [We love feedback](part2/feedback_please.md) +* [Better tools for authors](part2/better_tools.md) +``` + +### Front Matter + +Pages can contain an optional front matter. It can be used to define the page's description. The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines. Here is a basic example: + +```yaml +--- +description: This is a short description of my page +--- + +# The content of my page +``` diff --git a/docs/plugins.md b/docs/plugins.md new file mode 100644 index 0000000..ff56b7b --- /dev/null +++ b/docs/plugins.md @@ -0,0 +1,26 @@ +# Plugins + +Plugins are the best way to extend GitBook functionalities (ebook and website). There exist plugins to do a lot of things: bring math formulas display support, track visits using Google Analytic, etc. + +### How to find plugins? + +Plugins can be easily searched on [plugins.gitbook.com](https://plugins.gitbook.com). + + +### How to install a plugin? + +Once you find a plugin that you want to install, you need to add it to your `book.json`: + +``` +{ + "plugins": ["myPlugin", "anotherPlugin"] +} +``` + +You can also specify a specific version using: `"myPlugin@0.3.1"`. By default GitBook will resolve the latest version of the plugin compatbile with the current GitBook version. + +Plugins are automatically installed on [GitBook.com](https://www.gitbook.com). Locally, run `gitbook install` to install and prepare all plugins for your books. + +### Configuring plugins + +PLugins specific configurations are stored in `pluginsConfig`. You have to refer to the documentation of the plugin itself for details about the available options. diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 0000000..3ce416e --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,45 @@ +# Setup and Installation of GitBook + +Getting GitBook installed and ready-to-go should only take a few minutes. + +### GitBook.com + +[GitBook.com](https://www.gitbook.com) is an easy to use solution to write, publish and host books. It's best and easier solution for publishing your content and collaborate on it. + +It integrates well with the [GitBook Editor](https://www.gitbook.com/editor). + +### Local Installation + +##### Requirements + +Installing GitBook is easy and straight-forward, but there are a few requirements you’ll need to make sure your system has before you start. + +* NodeJS (v4.0.0 and above are adviced) +* Windows, Linux, Unix, or Mac OS X + +##### Install with NPM + +The best way to install GitBook is via **NPM**. At the terminal prompt, simply run the following command to install GitBook: + +``` +$ npm install gitbook-cli -g +``` + +`gitbook-cli` is an utility to install and use multiple versions of GitBook on the same system. It will automatically install the required version to build a book. + +##### Using pre-releases + +`gitbook-cli` makes it easy to install and test other versions of GitBook with your book: + +``` +$ gitbook install beta +``` + +##### Debugging + +You can use the options `--log=debug` and `--debug` to get better error messages (with stack trace). For example: + +``` +$ gitbook build ./ --log=debug --debug +``` + diff --git a/docs/structure.md b/docs/structure.md new file mode 100644 index 0000000..31b00f6 --- /dev/null +++ b/docs/structure.md @@ -0,0 +1,62 @@ +# Directory structure + +GitBook uses a very simple and obvious directory sttructure: + +``` +. +├── book.json +├── README.md +├── SUMMARY.md +├── chapter-1/ +| ├── README.md +| └── something.md +└── chapter-2/ + ├── README.md + └── something.md +``` + +An overview of what each of these does: + +| File | Description | +| -------- | ----------- | +| `book.json` | Stores [configuration](config.md) data (__optional__) | +| `README.md` | Preface / Introduction for your book (**required**) | +| `SUMMARY.md` | Table of Contents | + + +### Static files and Images + +A static file is a file that is not listed in the `SUMMARY.md`. All static files, not [ignored](#ignore), are copied to the output. + +### Ignoring files & folders {#ignore} + +GitBook will read the `.gitignore`, `.bookignore` and `.ignore` files to get a list of files and folders to skip. +The format inside those files, follows the same convention as `.gitignore`: + +```markdown +# This is a comment + +# Ignore the file test.md +test.md + +# Ignore everything in the directory "bin" +bin/* +``` + +### Project documentation / Sub-directory {#subdirectory} + +For project documentaiton, it sometimes better to use a diretcory (like `docs/`) to store the prject's documentation. You can use a `.gitbook` file to indicate to GitBook in which folder the book is stored: + +``` +. +├── .gitbook +└── docs/ + ├── README.md + └── SUMMARY.md +``` + +With `.gitbook` containing: + +``` +./docs/ +``` diff --git a/docs/templating.md b/docs/templating.md new file mode 100644 index 0000000..38df38e --- /dev/null +++ b/docs/templating.md @@ -0,0 +1,90 @@ +# Templating + +GitBook uses the Nunjucks templating language to process pages and theme's templates. + +The Nunjucks syntax is very similar to **Jinja2** or **Liquid**. + +### Variables + +A variable looks up a value from the template context. If you wanted to simply display a variable, you would do: + +```twig +{{ username }} +``` + +This looks up username from the context and displays it. Variable names can have dots in them which lookup properties, just like javascript. You can also use the square bracket syntax. + +```twig +{{ foo.bar }} +{{ foo["bar"] }} +``` + +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 [context variables](variables.md). + +### Filters + +Filters are essentially functions that can be applied to variables. They are called with a pipe operator (`|`) and can take arguments. + +```twig +{{ foo | title }} +{{ foo | join(",") }} +{{ foo | replace("foo", "bar") | capitalize }} +``` + +The third example shows how you can chain filters. It would display "Bar", by first replacing "foo" with "bar" and then capitalizing it. + +### Tags + +##### if + +`if` tests a condition and lets you selectively display content. It behaves exactly as javascript's if behaves. + +```twig +{% if variable %} + It is true +{% endif %} +``` + +If variable is defined and evaluates to true, "It is true" will be displayed. Otherwise, nothing will be. + +You can specify alternate conditions with elif and else: + +```twig +{% if hungry %} + I am hungry +{% elif tired %} + I am tired +{% else %} + I am good! +{% endif %} +``` + +##### for + +`for` iterates over arrays and dictionaries. + +```twig +# Chapters about GitBook + +{% for article in glossary.terms['gitbook'].articles %} +* [{{ article.title }}]({{ article.path }}) +{% endfor %} +``` + +##### set + +`set` lets you create/modify a variable. + +```twig +{% set softwareVersion = "1.0.0" %} + +Current version is {{ softwareVersion }}. +[Download it](website.com/download/{{ softwareVersion }}) +``` + +##### include and block + +Inclusion and inheritance is detailled in the [ConRefs](conrefs.md) section. + diff --git a/docs/themes.md b/docs/themes.md new file mode 100644 index 0000000..48c19db --- /dev/null +++ b/docs/themes.md @@ -0,0 +1,26 @@ +# Theming + +Since version 3.0.0, GitBook can be easily themed. Books are using by default the [theme-default](https://github.com/GitbookIO/theme-default). + +The theme to use is specified in the [book's configuration](config.md) using key `theme`. + +> **Caution**: Custom theming can block some plugins from working correctly. + +### Structure of a theme + +A theme is a folder containing templates and assets. All the templates are optionnal, since theme are always extending the default theme. + +| Folder | Description | +| -------- | ----------- | +| `_layouts` | Main folder containing all the templates | +| `_layouts/website/page.html` | Template for a normal page | +| `_layouts/ebook/page.html` | Template for a normal page during ebook generation (PDF< ePub, Mobi) | + + +### Extend/Customize theme in a book + +Authors can extend the templates of a theme directly from the book source (without creating an external theme). Templates will be resolved in the `_layouts` folder of the book first, then in + +### Publish a theme + +Themes are published as plugins ([see related docs](plugins.md)) with a `theme-` prefix. For example the theme `awesome` will be loaded from `theme-awesome` plugin, and then from `gitbook-plugin-theme-awesome` NPM package. diff --git a/docs/variables.md b/docs/variables.md new file mode 100644 index 0000000..3dbd6f7 --- /dev/null +++ b/docs/variables.md @@ -0,0 +1,64 @@ +# 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 | +| `summary` | Information about the table of contents | +| `languages` | List of languages for multi-lingual books | +| `config` | Dump of the `book.json` | + +### Book Variables + +| Variable | Description | +| -------- | ----------- | +| `book.[CONFIGURATION_DATA]` | All the `variables` set via the `book.json` are available through the book variable. | +| `book.language` | Current language for a multilingual book | + +### GitBook Variables + +| Variable | Description | +| -------- | ----------- | +| `gitbook.time` | The current time (when you run the `gitbook` command). | +| `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 | +| `file.type` | The name of the parser used to compile this file (ex: `markdown`, `asciidoc`, etc) | + +#### 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`) | +| `page.dir` | Text direction, based on configuration or detected from content (`rtl` or `ltr`) | + +#### Table of Contents Variables + +| Variable | Description | +| -------- | ----------- | +| `summary.parts` | List of sections in the Table of Contents | + +Thw whole table of contents (`SUMMARY.md`) can be accessed: + +`summary.parts[0].articles[0].title` will return the title of the first article. + +#### Multi-lingual book Variable + +| Variable | Description | +| -------- | ----------- | +| `languages.list` | List of languages for this book | + +Languages are defined by `{ id: 'en', title: 'English' }`. |