|
|
@@ -10,8 +10,9 @@ created = 2018-02-22T19:13:36+01:00 |
|
|
|
updated = 2018-01-28T10:53:19+01:00 |
|
|
|
repository = "https://github.com/Keats/book" |
|
|
|
homepage = "https://github.com/Keats/book" |
|
|
|
minimum_version = "0.2" |
|
|
|
minimum_version = "0.4.0" |
|
|
|
license = "MIT" |
|
|
|
demo = "https://gutenberg-book.netlify.com" |
|
|
|
|
|
|
|
[extra.author] |
|
|
|
name = "Vincent Prouillet" |
|
|
@@ -43,8 +44,26 @@ and then enable it in your `config.toml`: |
|
|
|
|
|
|
|
```toml |
|
|
|
theme = "book" |
|
|
|
# Optional, if you want search |
|
|
|
build_search_index = true |
|
|
|
``` |
|
|
|
|
|
|
|
## Usage |
|
|
|
Book will generate a book from the files you place in the `content` directory. Your book |
|
|
|
can have two levels of hierarchy: chapters and subchapters. |
|
|
|
|
|
|
|
Each chapter should be a `section` within the Gutenberg site and should have an `_index.md` |
|
|
|
file that sets its `weight` front-matter variable to its chapter number. For example, |
|
|
|
chapter 2 should have `weight = 2`. Additionally, each chapter should also set the |
|
|
|
`sort_by = "weight"` in its front matter. |
|
|
|
|
|
|
|
Each subchapter should be a `page` and should have its `weight` variable set to the subchapter |
|
|
|
number. For example, subchapter 3.4 should have `weight = 4`. |
|
|
|
|
|
|
|
Finally, you should create an `_index.md` file and set the `redirect_to` front-matter variable |
|
|
|
to redirect to the first section of your content. For example, if your first section has the |
|
|
|
slug `introduction`, then you would set `redirect_to = "introduction"`. |
|
|
|
|
|
|
|
## Options |
|
|
|
|
|
|
|
### Numbered chapters |
|
|
|