diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-17 16:51:21 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-17 16:51:21 +0100 |
commit | dac00be7b5a4aefa9cc3f63e5d94e729269bdfb0 (patch) | |
tree | ef9909e4b5f6708a480a387ed70f9f0d9c823c1f | |
parent | 4e7cb9b23f9234fcbcdc1d151501c1a7a7ea0028 (diff) | |
download | gitbook-dac00be7b5a4aefa9cc3f63e5d94e729269bdfb0.zip gitbook-dac00be7b5a4aefa9cc3f63e5d94e729269bdfb0.tar.gz gitbook-dac00be7b5a4aefa9cc3f63e5d94e729269bdfb0.tar.bz2 |
Add some doc about theming
-rw-r--r-- | docs/SUMMARY.md | 3 | ||||
-rw-r--r-- | docs/config.md | 23 | ||||
-rw-r--r-- | docs/themes.md | 26 |
3 files changed, 52 insertions, 0 deletions
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index ad5b67a..58d6763 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -1,6 +1,7 @@ # Summary * [About this document](README.md) +* [Configuration](config.md) * [Pages and Summary](pages.md) * [Assets](assets.md) * [Glossary](glossary.md) @@ -8,3 +9,5 @@ * [Content References](conrefs.md) * [Variables](variables.md) * [Filters](filters.md) +* [Plugins](plugins.md) +* [Theming](themes.md)
\ No newline at end of file diff --git a/docs/config.md b/docs/config.md new file mode 100644 index 0000000..750f88f --- /dev/null +++ b/docs/config.md @@ -0,0 +1,23 @@ +# 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) for more details | +| `pluginsConfig` |Configuration for plugins, See [the plugins section](#plugins) for more details | + + +### Plugins + +Plugins and their configurations are specified in the `book.json`. + diff --git a/docs/themes.md b/docs/themes.md new file mode 100644 index 0000000..d92f0ac --- /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 [gitbook-theme-default](https://github.com/GitbookIO/gitbook-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. |