aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2020-12-20 12:01:30 -0500
committerChristine Dodrill <me@christine.website>2020-12-20 12:01:30 -0500
commit276023d371f60fc1127f65b47cc6b50bce578624 (patch)
treed29cc946fb7059334d4aaaf6b905f9b4b4f412d0 /src
parentccdee6431d2bedb912f2b9030ff240b103167cc8 (diff)
downloadxesite-276023d371f60fc1127f65b47cc6b50bce578624.tar.xz
xesite-276023d371f60fc1127f65b47cc6b50bce578624.zip
oh my god i was an idiot
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'src')
-rw-r--r--src/post/mod.rs3
1 files changed, 2 insertions, 1 deletions
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<Vec<Post>> {
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<mi::WebMention> = match mi {
None => vec![],