diff --git a/server.py b/server.py index 8cbb6ad..ebdfcd6 100755 --- a/server.py +++ b/server.py @@ -197,7 +197,7 @@ def news(): except FileNotFoundError as e: return ("File not found Error ({})".format(e), HTTP_NOT_FOUND) - return flask.render_template("news.html", conf=app.config, article=article) + return flask.render_template("news.html", conf=app.config, article=article, title=article["title"]) @app.route("/static/") def sendStatic(path): diff --git a/templates/head.html b/templates/head.html index d8127da..b732b59 100644 --- a/templates/head.html +++ b/templates/head.html @@ -5,6 +5,12 @@ +{% if title %} + {{ title }} +{% else %} + {{ conf['SITE_TITLE'] }} +{% endif %} + diff --git a/templates/news.html b/templates/news.html index f6382e2..b303743 100644 --- a/templates/news.html +++ b/templates/news.html @@ -3,7 +3,6 @@ {% include 'head.html' %} - {{ article["title"] }}