Setting the post id based on the folder name.
This commit is contained in:
@@ -19,5 +19,10 @@ pub(crate) async fn build_site(args: BuildArgs) -> Result<(), CustomError> {
|
||||
.into_iter()
|
||||
.map(walkdir::DirEntry::into_path)
|
||||
.map(|path| tokio::spawn(BlogPost::load_blog_post(root_directory.clone(), path)));
|
||||
let mut blog_posts = Vec::new();
|
||||
for job in load_jobs {
|
||||
blog_posts.push(job.await??);
|
||||
}
|
||||
println!("{:?}", blog_posts);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user