Skip to content

Commit 6fd3303

Browse files
authored
Merge pull request #1197 from rust-lang/renovate/handlebars-5.x
Update Rust crate handlebars to v5
2 parents 56bf41c + ab91cfb commit 6fd3303

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

Cargo.lock

Lines changed: 3 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ path = "src/blog.rs"
1111
[dependencies]
1212
color-eyre = "=0.6.2"
1313
eyre = "=0.6.11"
14-
handlebars = { version = "=3.5.5", features = ["dir_source"] }
14+
handlebars = { version = "=5.0.0", features = ["dir_source"] }
1515
lazy_static = "=1.4.0"
1616
serde = "=1.0.195"
1717
serde_derive = "=1.0.195"

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl<'a> Generator<'a> {
5454
) -> eyre::Result<Self> {
5555
let mut handlebars = Handlebars::new();
5656
handlebars.set_strict_mode(true);
57-
handlebars.register_templates_directory(".hbs", "templates")?;
57+
handlebars.register_templates_directory("templates", Default::default())?;
5858
handlebars.register_helper("month_name", Box::new(hb_month_name_helper));
5959

6060
Ok(Generator {
@@ -149,7 +149,6 @@ impl<'a> Generator<'a> {
149149

150150
let data = json!({
151151
"title": blog.index_title(),
152-
"parent": "layout",
153152
"blog": blog,
154153
"other_blogs": other_blogs,
155154
"root": blog.path_back_to_root(),
@@ -173,7 +172,6 @@ impl<'a> Generator<'a> {
173172

174173
let data = json!({
175174
"title": format!("{} | {}", post.title, blog.title()),
176-
"parent": "layout",
177175
"blog": blog,
178176
"post": post,
179177
"root": blog.path_back_to_root().join("../../../"),

templates/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
</div>
3737
</section>
3838
{{/inline}}
39-
{{~> (parent)~}}
39+
{{~> layout~}}

templates/post.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
</div>
1717
</section>
1818
{{/inline}}
19-
{{~> (parent)~}}
19+
{{~> layout~}}

0 commit comments

Comments
 (0)