pub fn find_related_assets(path: &Path) -> Vec<PathBuf> {
    let mut assets = vec![];

    for entry in read_dir(path).unwrap().filter_map(std::result::Result::ok) {
        let entry_path = entry.path();
        if entry_path.is_file() {
            match entry_path.extension() {
                Some(e) => match e.to_str() {
                    Some("md") => continue,
                    _ => assets.push(entry_path.to_path_buf()),
                },
                None => continue,
            }
        }
    }

    assets
}
/// Looks into the current folder for the path and see if there's anything that is not a .md
/// file. Those will be copied next to the rendered .html file
Looks into the current folder for the path and see if there's anything that is not a .md
file. Those will be copied next to the rendered .html file
Looks into the current folder for the path and see if there ' s anything that is not a . md file . Those will be copied next to the rendered . html file
pub fn find_related_assets(path: &Path) -> Vec<PathBuf> {
    let mut assets = vec![];
    for entry in read_dir(path).unwrap().filter_map(std::result::Result::ok) {
        let entry_path = entry.path();
        if entry_path.is_file() {
            match entry_path.extension() {
                Some(e) => match e.to_str() {
                    Some("md") => continue,
                    _ => assets.push(entry_path.to_path_buf()),
                },
                None => continue,
            }
        }
    }
    assets
}
pub fn find_related_assets ( path : & Path ) -> Vec < PathBuf > { let mut assets = vec ! [ ] ; for entry in read_dir ( path ) . unwrap ( ) . filter_map ( std :: result :: Result :: ok ) { let entry_path = entry . path ( ) ; if entry_path . is_file ( ) { match entry_path . extension ( ) { Some ( e ) => match e . to_str ( ) { Some ( " " ) => continue , _ => assets . push ( entry_path . to_path_buf ( ) ) , } , None => continue , } } } assets }
Looks into the current folder for the path and see if there's anything that is not a .md
file.
Looks into the current folder for the path and see if there ' s anything that is not a . md file .
path
&Path
path
&Path