Skip to content

Commit 5e430c2

Browse files
authored
Merge pull request #344 from davidalber/title-tags
Update SEO titles on index page and post pages
2 parents 76e910f + 0c39ce1 commit 5e430c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ impl Blog {
198198

199199
fn render_index(&self) -> Result<(), Box<Error>> {
200200
let data = json!({
201-
"title": "Blog",
201+
"title": "The Rust Programming Language Blog",
202202
"parent": "layout",
203203
"posts": self.posts,
204204
});
@@ -224,7 +224,7 @@ impl Blog {
224224
filename.set_extension("html");
225225

226226
let data = json!({
227-
"title": "The Rust Programming Language Blog",
227+
"title": format!("{} | Rust Blog", post.title),
228228
"parent": "layout",
229229
"post": post,
230230
});

templates/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<header class="mt3 mt0-ns mb6-ns">
33
<div class="container flex flex-column flex-row-l justify-between-l">
44
<div class="mw8-l">
5-
<h1>{{ title }}</h1>
5+
<h1>Blog</h1>
66
</div>
77
</div>
88
</header>

0 commit comments

Comments
 (0)