From cec65d0fa7ad4bbf6439a46c08adb538a8644f57 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Thu, 23 Jun 2022 20:56:39 +0200 Subject: [PATCH] Stop printing invalid files in dirs Too many invalid stuff like emacs files --- components/site/src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 92c073b387..4b3b94ba2a 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -218,7 +218,7 @@ impl Site { // is it a section or not? if path.is_dir() { // if we are processing a section we have to collect - // index files for all languages and process them simultaniously + // index files for all languages and process them simultaneously // before any of the pages let index_files = WalkDir::new(&path) .follow_links(true) @@ -228,15 +228,12 @@ impl Site { Err(_) => None, Ok(f) => { let path_str = f.path().file_name().unwrap().to_str().unwrap(); + // https://github.com/getzola/zola/issues/1244 if f.path().is_file() && allowed_index_filenames.iter().any(|s| s == path_str) { Some(f) } else { - // https://github.com/getzola/zola/issues/1244 - if path_str.starts_with("_index.") { - println!("Expected a section filename, got `{}`. Allowed values: `{:?}`", path_str, &allowed_index_filenames); - } None } }