zola/components/config/src/lib.rs

20 lines
479 B
Rust
Raw Normal View History

2018-10-09 12:33:43 +00:00
mod config;
pub mod highlighting;
2018-10-31 07:18:57 +00:00
mod theme;
2019-12-21 21:52:39 +00:00
pub use crate::config::{Config, Language, LinkChecker, Taxonomy};
2018-10-09 12:33:43 +00:00
use std::path::Path;
2017-03-06 14:45:57 +00:00
/// Get and parse the config.
/// If it doesn't succeed, exit
pub fn get_config(filename: &Path) -> Config {
match Config::from_file(filename) {
Ok(c) => c,
Err(e) => {
println!("Failed to load {}", filename.display());
println!("Error: {}", e);
::std::process::exit(1);
}
}
}