From 276023d371f60fc1127f65b47cc6b50bce578624 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 20 Dec 2020 12:01:30 -0500 Subject: [PATCH] oh my god i was an idiot Signed-off-by: Christine Dodrill --- blog/7e-2020-12-20.markdown | 6 +++--- src/post/mod.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/blog/7e-2020-12-20.markdown b/blog/7e-2020-12-20.markdown index 09f7da9..77485b7 100644 --- a/blog/7e-2020-12-20.markdown +++ b/blog/7e-2020-12-20.markdown @@ -1,6 +1,6 @@ --- title: The 7th Edition -date: 12/20/2020 +date: 2020-12-19 tags: - ttrpg --- @@ -132,10 +132,10 @@ Don't worry about accuracy or the like. You are setting out to have fun. ## Special Thanks -Special thanks goes to Jared, who sent out this tweet[1] that inspired this +Special thanks goes to Jared, who sent out this [tweet][1] that inspired this document. In case the tweet gets deleted, here's what it said: -[[1]: heres a d&d for you](https://twitter.com/infinite_mao/status/1340402360259137541) +[1]: https://twitter.com/infinite_mao/status/1340402360259137541 > heres a d&d for you diff --git a/src/post/mod.rs b/src/post/mod.rs index c66e79c..79affbc 100644 --- a/src/post/mod.rs +++ b/src/post/mod.rs @@ -81,7 +81,8 @@ pub async fn load(dir: &str, mi: Option<&mi::Client>) -> Result> { let (fm, content_offset) = frontmatter::Data::parse(body.clone().as_str()) .wrap_err_with(|| format!("can't parse frontmatter of {:?}", path))?; let markup = &body[content_offset..]; - let date = NaiveDate::parse_from_str(&fm.clone().date, "%Y-%m-%d")?; + let date = NaiveDate::parse_from_str(&fm.clone().date, "%Y-%m-%d") + .map_err(|why| eyre!("error parsing date in {:?}: {}", path, why))?; let link = format!("{}/{}", dir, path.file_stem().unwrap().to_str().unwrap()); let mentions: Vec = match mi { None => vec![],