From b16085acd6290a46448b5a31d147ba6ac640316b Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 11 Apr 2022 21:00:32 +0200 Subject: Add documentation for "config" parameter --- book/src/creating_templates.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'book') 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> { ... } + ``` -- cgit