Standardize the construction of intermediate BlogPostPage.

This commit is contained in:
Tom Alexander
2023-12-19 17:09:11 -05:00
parent 261fe8a1a2
commit 4bb1f9983a
27 changed files with 405 additions and 248 deletions

View File

@@ -7,6 +7,7 @@ use tokio::task::JoinHandle;
use walkdir::WalkDir;
use crate::error::CustomError;
use crate::intermediate::page::BlogPostPageInput;
use crate::intermediate::registry::Registry;
use super::BlogPostPage;
@@ -63,8 +64,11 @@ impl BlogPost {
let registry = Arc::new(Mutex::new(registry));
let relative_to_post_dir_path = real_path.strip_prefix(post_dir)?;
ret.push(
BlogPostPage::new(relative_to_post_dir_path, registry, parsed_document)
.await?,
BlogPostPage::new(
registry,
BlogPostPageInput::new(relative_to_post_dir_path, parsed_document),
)
.await?,
);
}
ret