Tera preprocessor for mdBook
API documentation hosted on docs.rs.
```text $ mdbook-tera --help mdbook-tera 0.4.0 A mdBook preprocessor that renders Tera
USAGE: mdbook-tera [OPTIONS] [SUBCOMMAND]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
--json
SUBCOMMANDS: help Prints this message or the help of the given subcommand(s) supports Check whether a renderer is supported by this preprocessor ```
First install the tera preprocessor.
text
cargo install mdbook-tera
Then in your book.toml
file, add the tera preprocessor as below.
```toml
[preprocessor.tera] ```
toml
[preprocessor.tera]
command = "mdbook-tera --json ./src/context.json"
See example-book
for a basic usage.
Simply define your values in the context.toml
file, and use them in tera statements.
You can access the book context with the key ctx
.
```md
{{ my_value }} ```