Add a config variable for a logo path

This commit is contained in:
Björn Guth 2021-06-22 15:11:49 +02:00
parent 4d2dc6f482
commit a5ec0dac1c
1 changed files with 6 additions and 0 deletions

View File

@ -417,6 +417,9 @@ pub struct BookConfig {
pub multilingual: bool,
/// The main language of the book.
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 {
@ -428,6 +431,7 @@ impl Default for BookConfig {
src: PathBuf::from("src"),
multilingual: false,
language: Some(String::from("en")),
logo: None,
}
}
}
@ -761,6 +765,8 @@ mod tests {
multilingual: true,
src: PathBuf::from("source"),
language: Some(String::from("ja")),
// TODO: add a test logo
logo: None,
};
let build_should_be = BuildConfig {
build_dir: PathBuf::from("outputs"),