pub fn write_html_files_to_directory( directory: &Path, write: impl FnOnce(&mut BufWriter<&mut File>) -> Result<()>, ) -> Result<()>