Create a render ast node type.
This commit is contained in:
@@ -39,13 +39,23 @@ impl BlogPostPage {
|
||||
));
|
||||
}
|
||||
|
||||
// TODO: Get footnote definitions
|
||||
let footnotes = {
|
||||
let footnote_definitions: Vec<_> = registry
|
||||
.get_footnote_ids()
|
||||
.map(|(id, def)| (id, def.clone()))
|
||||
.collect();
|
||||
let mut ret = Vec::new();
|
||||
for (id, def) in footnote_definitions.into_iter() {
|
||||
ret.push(IRealFootnoteDefinition::new(registry, id, def).await?);
|
||||
}
|
||||
ret
|
||||
};
|
||||
|
||||
Ok(BlogPostPage {
|
||||
path,
|
||||
title: get_title(&document),
|
||||
children,
|
||||
footnotes: Vec::new(), // TODO
|
||||
footnotes,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user