diff options
Diffstat (limited to 'src/internal/mod.rs')
-rw-r--r-- | src/internal/mod.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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<Post>, +} + +pub async fn init() -> Result<SiteState> { + let blog = crate::blog::post::load("blog").await?; + + Ok(SiteState { + blog, + }) +} |