Setting the post id based on the folder name.

This commit is contained in:
Tom Alexander
2023-10-22 13:50:11 -04:00
parent 2f0f3ab346
commit 07e4209048
2 changed files with 10 additions and 1 deletions

View File

@@ -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(())
}