You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
492B

  1. mod config;
  2. pub mod highlighting;
  3. mod theme;
  4. pub use crate::config::{Config, Language, LinkChecker, Taxonomy};
  5. use std::path::Path;
  6. /// Get and parse the config.
  7. /// If it doesn't succeed, exit
  8. pub fn get_config(path: &Path, filename: &str) -> Config {
  9. match Config::from_file(path.join(filename)) {
  10. Ok(c) => c,
  11. Err(e) => {
  12. println!("Failed to load {}", filename);
  13. println!("Error: {}", e);
  14. ::std::process::exit(1);
  15. }
  16. }
  17. }