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

@@ -8,11 +8,17 @@ pub(crate) struct ITarget {
value: String,
}
intermediate!(ITarget, Target, original, registry, {
let mut registry = registry.lock().unwrap();
let id = registry.get_target(original.value);
Ok(ITarget {
id: id.clone(),
value: original.value.to_owned(),
})
});
intermediate!(
ITarget,
&'orig organic::types::Target<'parse>,
original,
registry,
{
let mut registry = registry.lock().unwrap();
let id = registry.get_target(original.value);
Ok(ITarget {
id: id.clone(),
value: original.value.to_owned(),
})
}
);