Skip to content

Commit

Permalink
fail more violently when presented with miss configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Aug 20, 2024
1 parent dc06fc4 commit 369abd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Blog {
let content = content.strip_prefix("---").unwrap();
let (meta, text) = content.split_once("---").unwrap();

let meta: WrittenPostMeta = serde_yaml::from_str(meta)?;
let meta: WrittenPostMeta = serde_yaml::from_str(meta).expect("cannot parse header in blog");
let file_name = path.file_name().unwrap().to_str().unwrap();

if file_name.starts_with('_') {
Expand All @@ -87,7 +87,7 @@ impl Blog {
let is_rst_file = file_name.ends_with(".rst");

info!("reading blog post: {} is rst: {}", &file_name, &is_rst_file);
let (idx, lang, slug) = parse_file_name(file_name)?;
let (idx, lang, slug) = parse_file_name(file_name).expect("cannot parse file name");

let body = if is_rst_file {
let mut buffer: Vec<u8> = Vec::new();
Expand Down

0 comments on commit 369abd6

Please sign in to comment.