Standardize the construction of intermediate BlogPostPage.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user