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/themes.md | |
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/themes.md')
-rw-r--r-- | docs/themes.md | 26 |
1 files changed, 26 insertions, 0 deletions
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. |