Create a render ast node type.

This commit is contained in:
Tom Alexander
2023-10-29 15:36:15 -04:00
parent 645ae26701
commit b66ec507ef
74 changed files with 566 additions and 80 deletions

View File

@@ -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,
})
}