diff --git a/src/renderer/html_handlebars/search.rs b/src/renderer/html_handlebars/search.rs index a6f9a89d..310d8f09 100644 --- a/src/renderer/html_handlebars/search.rs +++ b/src/renderer/html_handlebars/search.rs @@ -26,6 +26,9 @@ pub fn create_files(search_config: &Search, destination: &Path, book: &Book) -> let index = write_to_js(index, &search_config, doc_urls)?; debug!("Writing search index ✓"); + if index.len() > 10_000_000 { + warn!("searchindex.js is very large ({} bytes)", index.len()); + } if search_config.copy_js { utils::fs::write_file(destination, "searchindex.js", index.as_bytes())?;