Add a config variable for a logo path
This commit is contained in:
parent
4d2dc6f482
commit
a5ec0dac1c
|
@ -417,6 +417,9 @@ pub struct BookConfig {
|
||||||
pub multilingual: bool,
|
pub multilingual: bool,
|
||||||
/// The main language of the book.
|
/// The main language of the book.
|
||||||
pub language: Option<String>,
|
pub language: Option<String>,
|
||||||
|
/// A logo to be displayed on top of the navigation bar. The path is relative to the source
|
||||||
|
/// path
|
||||||
|
pub logo: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for BookConfig {
|
impl Default for BookConfig {
|
||||||
|
@ -428,6 +431,7 @@ impl Default for BookConfig {
|
||||||
src: PathBuf::from("src"),
|
src: PathBuf::from("src"),
|
||||||
multilingual: false,
|
multilingual: false,
|
||||||
language: Some(String::from("en")),
|
language: Some(String::from("en")),
|
||||||
|
logo: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -761,6 +765,8 @@ mod tests {
|
||||||
multilingual: true,
|
multilingual: true,
|
||||||
src: PathBuf::from("source"),
|
src: PathBuf::from("source"),
|
||||||
language: Some(String::from("ja")),
|
language: Some(String::from("ja")),
|
||||||
|
// TODO: add a test logo
|
||||||
|
logo: None,
|
||||||
};
|
};
|
||||||
let build_should_be = BuildConfig {
|
let build_should_be = BuildConfig {
|
||||||
build_dir: PathBuf::from("outputs"),
|
build_dir: PathBuf::from("outputs"),
|
||||||
|
|
Loading…
Reference in New Issue