summaryrefslogblamecommitdiff
path: root/src/internal/mod.rs
blob: f924c504fa67bd339034b5af968045ccb6dc827d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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,
    })
}