Skip to content

Commit

Permalink
Add documentation for "config" parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 11, 2022
1 parent 79747c3 commit ec1f380
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions book/src/creating_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -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> { ... }
```
```
* `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> { ... }
```

0 comments on commit ec1f380

Please sign in to comment.