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.

18 lines
416B

  1. use std::env;
  2. use errors::Result;
  3. use site::Site;
  4. use console;
  5. pub fn build(config_file: &str, base_url: Option<&str>) -> Result<()> {
  6. let mut site = Site::new(env::current_dir().unwrap(), config_file)?;
  7. if let Some(b) = base_url {
  8. site.config.base_url = b.to_string();
  9. }
  10. site.load()?;
  11. console::notify_site_size(&site);
  12. console::warn_about_ignored_pages(&site);
  13. site.build()
  14. }