aboutsummaryrefslogtreecommitdiffstats
path: root/book/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--book/src/creating_templates.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/book/src/creating_templates.md b/book/src/creating_templates.md
index 406a825..e087ede 100644
--- a/book/src/creating_templates.md
+++ b/book/src/creating_templates.md
@@ -84,10 +84,17 @@ recognized:
struct HelloTemplate<'a> { ... }
```
* `syntax` (as `syntax = "foo"`): set the syntax name for a parser defined
- in the configuration file. The default syntax , "default", is the one
+ in the configuration file. The default syntax , "default", is the one
provided by Askama.
```rust
#[derive(Template)]
#[template(path = "hello.html", syntax = "foo")]
struct HelloTemplate<'a> { ... }
- ``` \ No newline at end of file
+ ```
+* `config` (as `config = "config_file_path"`): set the path for the config file
+ to be used. The path is interpreted as relative to your crate root.
+ ```rust
+ #[derive(Template)]
+ #[template(path = "hello.html", config = "config.toml")]
+ struct HelloTemplate<'a> { ... }
+ ```