diff --git a/src/cmd/check.rs b/src/cmd/check.rs index 214f35c..c2991ac 100644 --- a/src/cmd/check.rs +++ b/src/cmd/check.rs @@ -15,7 +15,7 @@ pub fn check(config_file: &str, base_path: Option<&str>, base_url: Option<&str>) site.set_base_url(b.to_string()); } site.load()?; - console::notify_site_size_simple(&site); + console::check_site_summary(&site); console::warn_about_ignored_pages(&site); Ok(()) } diff --git a/src/console.rs b/src/console.rs index ced66e5..c570715 100644 --- a/src/console.rs +++ b/src/console.rs @@ -59,14 +59,19 @@ pub fn notify_site_size(site: &Site) { } /// Display in the console only the number of pages/sections in the site -pub fn notify_site_size_simple(site: &Site) { +pub fn check_site_summary(site: &Site) { let library = site.library.read().unwrap(); + let orphans = library.get_all_orphan_pages(); println!( - "-> {} pages ({} orphan), {} sections", + "-> Site content: {} pages ({} orphan), {} sections", library.pages().len(), - site.get_number_orphan_pages(), + orphans.len(), library.sections().len() - 1, // -1 since we do not count the index as a section there ); + + for orphan in orphans { + warn(&format!("Orphan page found: {}", orphan.path)); + } } /// Display a warning in the console if there are ignored pages in the site