Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for build.preprocess config #686

Merged
merged 1 commit into from
May 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions book-example/src/format/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,21 @@ This controls the build process of your book.
will be created when the book is built (i.e. `create-missing = true`). If this
is `false` then the build process will instead exit with an error if any files
do not exist.
- **preprocess:** Specify which preprocessors to be applied. Default is `["links", "index"]`. To disable default preprocessors, pass an empty array `[]` in.


The following preprocessors are available and included by default:

- `links`: Expand the `{{# playpen}}` and `{{# include}}` handlebars helpers in a chapter.
- `index`: Convert all chapter files named `README.md` into `index.md`. That is to say, all `README.md` would be rendered to an index file `index.html` in the rendered book.


**book.toml**
```toml
[build]
build-dir = "build"
create-missing = false
preprocess = ["links", "index"]
```

### HTML renderer options
Expand Down Expand Up @@ -132,6 +141,11 @@ title = "Example book"
authors = ["John Doe", "Jane Doe"]
description = "The example book covers examples."

[build]
build-dir = "book"
create-missing = true
preprocess = ["links", "index"]

[output.html]
theme = "my-theme"
curly-quotes = true
Expand Down