Browse Source

Add number of pages/section on serve as well

index-subcmd
Vincent Prouillet 7 years ago
parent
commit
f44d698844
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/cmd/serve.rs

+ 2
- 0
src/cmd/serve.rs View File

@@ -56,6 +56,7 @@ fn rebuild_done_handling(broadcaster: &Sender, res: Result<()>, reload_path: &st
pub fn serve(interface: &str, port: &str, config_file: &str) -> Result<()> { pub fn serve(interface: &str, port: &str, config_file: &str) -> Result<()> {
let start = Instant::now(); let start = Instant::now();
let mut site = Site::new(env::current_dir().unwrap(), config_file)?; let mut site = Site::new(env::current_dir().unwrap(), config_file)?;

let address = format!("{}:{}", interface, port); let address = format!("{}:{}", interface, port);
// Override the base url so links work in localhost // Override the base url so links work in localhost
site.config.base_url = if site.config.base_url.ends_with('/') { site.config.base_url = if site.config.base_url.ends_with('/') {
@@ -66,6 +67,7 @@ pub fn serve(interface: &str, port: &str, config_file: &str) -> Result<()> {


site.load()?; site.load()?;
site.enable_live_reload(); site.enable_live_reload();
println!("-> Creating {} pages and {} sections", site.pages.len(), site.sections.len());
site.build()?; site.build()?;
report_elapsed_time(start); report_elapsed_time(start);




Loading…
Cancel
Save