diff options
-rw-r--r-- | docs/config.md | 10 | ||||
-rw-r--r-- | docs/themes/README.md | 17 |
2 files changed, 18 insertions, 9 deletions
diff --git a/docs/config.md b/docs/config.md index 01d4d48..2629cbb 100644 --- a/docs/config.md +++ b/docs/config.md @@ -20,18 +20,12 @@ GitBook allows you to customize your book using a flexible configuration. These Plugins and their configurations are specified in the `book.json`. See [the plugins section](plugins/README.md) for more details. -| Variable | Description | -| -------- | ----------- | -| `plugins` | List of plugins to load | -| `pluginsConfig` |Configuration for plugins | - -### Theme - Since version 3.0.0, GitBook can use themes. See [the theming section](themes/README.md) for more details. | Variable | Description | | -------- | ----------- | -| `theme` | The theme to use for the book | +| `plugins` | List of plugins to load | +| `pluginsConfig` |Configuration for plugins | ### Structure diff --git a/docs/themes/README.md b/docs/themes/README.md index 5209d89..a0b138e 100644 --- a/docs/themes/README.md +++ b/docs/themes/README.md @@ -17,7 +17,22 @@ A theme is a plugin containing templates and assets. Overriding any individual t ### Extend/Customize theme in a book -Authors can extend the templates of a theme directly from their book's source (without creating an external theme). Templates will be resolved in the `_layouts` folder of the book first, then in +Authors can extend the templates of a theme directly from their book's source (without creating an external theme). Templates will be resolved in the `_layouts` folder of the book first, then in the installed plugins/themes. + +### Extend instead of Forking + +When you want to make your theme changes available to multiple books, instead of forking the default theme, you can extend it using the [templating syntax](../templating/README.md): + +```html +{% extends template.self %} + +{% block body %} + {{ super() }} + ... This will be added to the "body" block +{% endblock %} +``` + +Take a look at the [API](https://github.com/GitbookIO/theme-api) theme for a more complete example. ### Publish a theme |