zola/components/config/src/lib.rs

22 lines
523 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;
pub use crate::config::{
languages::Language, link_checker::LinkChecker, taxonomies::Taxonomy, Config,
};
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);
}
}
}