fn serialize_assets(&self, base_path: &PathBuf) -> Vec<String> {
        self.assets
            .iter()
            .filter_map(|asset| asset.file_name())
            .filter_map(|filename| filename.to_str())
            .map(|filename| {
                let mut path = self.file.path.clone();
                // Popping the index.md from the path since file.parent would be one level too high
                // for our need here
                path.pop();
                path.push(filename);
                path = path
                    .strip_prefix(&base_path.join("content"))
                    .expect("Should be able to stripe prefix")
                    .to_path_buf();
                path
            })
            .map(|path| path.to_string_lossy().to_string())
            .collect()
    }
/// Creates a vectors of asset URLs.
Creates a vectors of asset URLs.
Creates a vectors of asset URLs .
fn serialize_assets(&self, base_path: &PathBuf) -> Vec<String> {
        self.assets
            .iter()
            .filter_map(|asset| asset.file_name())
            .filter_map(|filename| filename.to_str())
            .map(|filename| {
                let mut path = self.file.path.clone();
                // Popping the index.md from the path since file.parent would be one level too high
                // for our need here
                path.pop();
                path.push(filename);
                path = path
                    .strip_prefix(&base_path.join("content"))
                    .expect("Should be able to stripe prefix")
                    .to_path_buf();
                path
            })
            .map(|path| path.to_string_lossy().to_string())
            .collect()
    }
fn serialize_assets ( & self , base_path : & PathBuf ) -> Vec < String > { self . assets . iter ( ) . filter_map ( | asset | asset . file_name ( ) ) . filter_map ( | filename | filename . to_str ( ) ) . map ( | filename | { let mut path = self . file . path . clone ( ) ; // Popping the index.md from the path since file.parent would be one level too high // for our need here path . pop ( ) ; path . push ( filename ) ; path = path . strip_prefix ( & base_path . join ( " " ) ) . expect ( " " ) . to_path_buf ( ) ; path } ) . map ( | path | path . to_string_lossy ( ) . to_string ( ) ) . collect ( ) }
Creates a vectors of asset URLs.
Creates a vectors of asset URLs .
&self
base_path
&PathBuf