zola/src/cmd/build.rs

13 lines
320 B
Rust
Raw Normal View History

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
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
}