add: html footer config
This commit is contained in:
parent
4af112d615
commit
cf38022597
5 changed files with 35 additions and 3 deletions
|
@ -150,8 +150,7 @@ impl Default for TurnstileConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
#[derive(Default)]
|
||||
#[derive(Clone, Serialize, Deserialize, Debug, Default)]
|
||||
pub struct ConnectionsConfig {
|
||||
/// <https://developer.spotify.com/documentation/web-api>
|
||||
#[serde(default)]
|
||||
|
@ -164,7 +163,6 @@ pub struct ConnectionsConfig {
|
|||
pub last_fm_secret: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
/// Configuration file
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
pub struct Config {
|
||||
|
@ -222,6 +220,10 @@ pub struct Config {
|
|||
pub town_square: usize,
|
||||
#[serde(default)]
|
||||
pub connections: ConnectionsConfig,
|
||||
/// The path to the HTML footer file. The contents of this file are embedded
|
||||
/// into every HTML template. They support access to template fields like `{{ user }}`.
|
||||
#[serde(default)]
|
||||
pub html_footer_path: String,
|
||||
}
|
||||
|
||||
fn default_name() -> String {
|
||||
|
@ -308,6 +310,7 @@ impl Default for Config {
|
|||
turnstile: default_turnstile(),
|
||||
town_square: 0,
|
||||
connections: default_connections(),
|
||||
html_footer_path: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue