diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-04-11 21:00:32 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2022-04-21 10:08:42 +0200 |
commit | b16085acd6290a46448b5a31d147ba6ac640316b (patch) | |
tree | d0e950ce2c82c437d11994abc29f57a8afff32fb /book/src/creating_templates.md | |
parent | 047dc82d67619c10db8fa90fad56f8c14c72782b (diff) | |
download | askama-b16085acd6290a46448b5a31d147ba6ac640316b.tar.gz askama-b16085acd6290a46448b5a31d147ba6ac640316b.tar.bz2 askama-b16085acd6290a46448b5a31d147ba6ac640316b.zip |
Add documentation for "config" parameter
Diffstat (limited to '')
-rw-r--r-- | book/src/creating_templates.md | 11 |
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> { ... } + ``` |