add title to blogs

This commit is contained in:
Daniel Tsvetkov 2021-05-01 00:47:32 +02:00
parent ec0f820500
commit 705904e380
2 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,8 @@ def blog_post_filename(filename):
if not blog_post:
flash("Blog post doesn't exist")
return redirect(url_for('index'))
return render_template("blog_post/get.html", instance=blog_post)
return render_template("blog_post/get.html", instance=blog_post,
title="PiSquared Blog - {}".format(blog_post.title))
@app.route('/rss.xml')

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>PiSquared Blog</title>
<title>{{ title or "PiSquared Blog" }}</title>
<link rel="icon" type="image/png" sizes="32x32"
href="{{ url_for('static', filename='favicons/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="96x96"