diff --git a/src/config.rs b/src/config.rs index ec1a348..bc28a28 100644 --- a/src/config.rs +++ b/src/config.rs @@ -292,14 +292,19 @@ impl Config { .map(|url| format!("You can leave feedback on the [internals thread]({url}).")) .unwrap_or_default(); let prefix = if for_blog { + let date_path = chrono::Utc::now().date_naive().format("%Y/%m/%d"); format!( - r#"--- -layout: post -title: "{} pre-release testing" -author: Release automation -team: The Release Team ----{}"#, - release, "\n\n", + r#"+++ +path = "inside-rust/{date_path}/{release}-prerelease" +title = "{release} pre-release testing" +authors = ["Release automation"] + +[extra] +team = "the Release team" +team_url = "https://www.rust-lang.org/governance/teams/infra#team-release" ++++ + +"#, ) } else { String::new() @@ -310,7 +315,7 @@ team: The Release Team You can try it out locally by running: -```plain +``` RUSTUP_DIST_SERVER=https://dev-static.rust-lang.org rustup update stable ``` @@ -323,7 +328,7 @@ we'd love your feedback [on this GitHub issue][feedback]. [relnotes]: {release_notes_url} [feedback]: https://github.com/rust-lang/release-team/issues/16 - " +" )) } } diff --git a/src/main.rs b/src/main.rs index cc754d9..3e82358 100644 --- a/src/main.rs +++ b/src/main.rs @@ -905,11 +905,7 @@ impl Context { let blog_repo = token.repository()?; token.create_file( &blog_repo.default_branch, - &format!( - "posts/inside-rust/{}-{}-prerelease.md", - chrono::Utc::now().date_naive().format("%Y-%m-%d"), - version, - ), + &format!("content/inside-rust/{version}-prerelease.md"), &blog_contents, )?; } else if let Some(pr) = self.config.blog_pr {