metamuffin's personal website

About 1680324835407 milliseconds have passed since midnight of the january the first in 1970.

pub async fn article_metadata(path: PathBuf) -> anyhow::Result<ArticleMeta> {
    let f = File::open(&path).await.context("article not found")?;
    let mut f = BufReader::new(f);
    let mut buf = String::new();
    f.read_line(&mut buf).await.context("cant read the file")?; // assume the 1st line has the title
    Ok(ArticleMeta {
        title: String::from(buf[2..].trim()),
        canonical_name: path
            .ok_or(anyhow!("no file stem"))?
            .ok_or(anyhow!("this file's name is broken"))?
        date: iso8601::date(
                .ok_or(anyhow!("file has no name"))?
                .ok_or(anyhow!("this file's name is broken"))?[0..10],
        .map_err(|e| anyhow!("file date wrong: {e}"))?,

pub async fn get_articles(blog_root: &Path) -> anyhow::Result<Vec<ArticleMeta>> {
    let mut a = join_all(
            .map(|e| e.unwrap())