2017-03-14 12:25:45 +00:00
|
|
|
use std::env;
|
|
|
|
|
2017-03-08 00:13:50 +00:00
|
|
|
use gutenberg::errors::Result;
|
|
|
|
use gutenberg::Site;
|
2016-12-13 06:22:24 +00:00
|
|
|
|
2016-12-06 08:27:03 +00:00
|
|
|
|
2017-03-25 04:18:15 +00:00
|
|
|
pub fn build(config_file: &str) -> Result<()> {
|
|
|
|
let mut site = Site::new(env::current_dir().unwrap(), config_file)?;
|
2017-03-21 07:57:00 +00:00
|
|
|
site.load()?;
|
2017-03-25 06:52:51 +00:00
|
|
|
println!("-> Creating {} pages and {} sections", site.pages.len(), site.sections.len());
|
2017-03-20 10:00:00 +00:00
|
|
|
site.build()
|
2016-12-13 09:05:59 +00:00
|
|
|
}
|