From c4d7f8f50d53057005d6bb28ac487f69ea45bd5e Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sun, 19 Dec 2021 12:48:36 -0500 Subject: Add blog post parsing and templates templates WIP, not building properly --- src/internal/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/internal/mod.rs (limited to 'src/internal/mod.rs') diff --git a/src/internal/mod.rs b/src/internal/mod.rs new file mode 100644 index 0000000..f924c50 --- /dev/null +++ b/src/internal/mod.rs @@ -0,0 +1,16 @@ +use color_eyre::eyre::Result; +use crate::blog::post::Post; + +pub mod markdown; + +pub struct SiteState { + pub blog: Vec, +} + +pub async fn init() -> Result { + let blog = crate::blog::post::load("blog").await?; + + Ok(SiteState { + blog, + }) +} -- cgit v1.2.3