Skip to content

Commit 1e9ffa5

Browse files
committed
handlebars: Inline parent subexpressions
These zero-arity subexpressions are causing problems with Handlebars v4. Since we don't seem to use different values for `parent` anywhere we might as well inline them and use the `layout` partial directly.
1 parent 8a30d5b commit 1e9ffa5

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)