Config: templates dir
This commit is contained in:
parent
fa306e9542
commit
81681303b2
3 changed files with 14 additions and 9 deletions
|
|
@ -60,6 +60,9 @@ pub struct Config {
|
|||
pub reverse_proxy: bool,
|
||||
#[serde(default = "Config::default_root_url")]
|
||||
pub root_url: String,
|
||||
/// Templates directory. May be absolute or relative to config/data directory.
|
||||
#[serde(default = "Config::default_templates_dir")]
|
||||
pub templates_dir: String,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
|
|
@ -129,6 +132,9 @@ impl Config {
|
|||
fn default_root_url() -> String {
|
||||
"/".into()
|
||||
}
|
||||
fn default_templates_dir() -> String {
|
||||
"templates".into()
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
|
|
@ -156,6 +162,7 @@ impl Default for Config {
|
|||
matrix_user: Self::default_matrix_user(),
|
||||
reverse_proxy: Self::default_reverse_proxy(),
|
||||
root_url: Self::default_root_url(),
|
||||
templates_dir: Self::default_templates_dir(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue