We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e6c5689 + 6caa522 commit 275d195Copy full SHA for 275d195
src/main.rs
@@ -137,9 +137,9 @@ impl Generator {
137
fn render_post(&self, blog: &Blog, post: &Post) -> Result<(), Box<dyn Error>> {
138
let path = blog
139
.prefix()
140
- .join(&post.year.to_string())
141
- .join(&post.month.to_string())
142
- .join(&post.day.to_string());
+ .join(format!("{:04}", &post.year))
+ .join(format!("{:02}", &post.month))
+ .join(format!("{:02}", &post.day));
143
fs::create_dir_all(self.out_directory.join(&path))?;
144
145
// then, we render the page in that path
0 commit comments