|
@@ -55,9 +55,9 @@ fn render_post_listing(cwd: &path::PathBuf, layout: &str, posts: &Vec<Post>) {
|
55
|
55
|
}
|
56
|
56
|
|
57
|
57
|
fn main() {
|
58
|
|
- let cwd = env::current_dir()
|
59
|
|
- .expect("Couldn't read current directory");
|
60
|
|
- let layout = fs::read_to_string(cwd.join("templates").join("layout.html")).expect("Couldn't find layout template");
|
|
58
|
+ let cwd = env::current_dir().expect("Couldn't read current directory");
|
|
59
|
+ let layout = fs::read_to_string(&cwd.join("templates").join("layout.html"))
|
|
60
|
+ .expect("Couldn't find layout template");
|
61
|
61
|
let post_paths = read_posts_dir(&cwd.join("posts"));
|
62
|
62
|
let mut posts: Vec<Post> = vec![];
|
63
|
63
|
for path in post_paths {
|