Wrap the intermediate Registry in an IntermediateContext.
This is currently just to maintain consistency with the render phase's RenderContext but in the future it should allow us to include immutable data that is not locked behind the ArcMutex.
This commit is contained in:
@@ -9,6 +9,7 @@ use walkdir::WalkDir;
|
||||
use crate::error::CustomError;
|
||||
use crate::intermediate::page::BlogPostPageInput;
|
||||
use crate::intermediate::registry::Registry;
|
||||
use crate::intermediate::IntermediateContext;
|
||||
|
||||
use super::BlogPostPage;
|
||||
|
||||
@@ -62,10 +63,11 @@ impl BlogPost {
|
||||
});
|
||||
|
||||
let registry = Arc::new(Mutex::new(registry));
|
||||
let intermediate_context = IntermediateContext::new(registry)?;
|
||||
let relative_to_post_dir_path = real_path.strip_prefix(post_dir)?;
|
||||
ret.push(
|
||||
BlogPostPage::new(
|
||||
registry,
|
||||
intermediate_context,
|
||||
BlogPostPageInput::new(relative_to_post_dir_path, parsed_document),
|
||||
)
|
||||
.await?,
|
||||
|
||||
Reference in New Issue
Block a user