This commit is contained in:
@@ -27,8 +27,7 @@ fn load_posts() -> Result<HashMap<String, Post>, Error> {
|
||||
let typst = fs::read_to_string(typst_path).expect("Failed reading post");
|
||||
let title = re_title.captures(&typst)
|
||||
.expect(format!("Post title not found in {}", dir_path.to_str().unwrap()).as_str())
|
||||
.get(1).unwrap().as_str().trim().to_string() ;
|
||||
println!("{}", title);
|
||||
.get(1).unwrap().as_str().trim().to_string();
|
||||
let slug = re_slug.captures(&typst)
|
||||
.expect("Post slug not found")
|
||||
.get(1).unwrap().as_str().trim().to_string();
|
||||
|
||||
Reference in New Issue
Block a user