unify configuration of site titles

This commit is contained in:
2020-07-28 01:26:50 +02:00
parent 0dc083dab9
commit 5ead5fb292
3 changed files with 7 additions and 2 deletions

View File

@@ -197,7 +197,7 @@ def news():
except FileNotFoundError as e: except FileNotFoundError as e:
return ("File not found Error ({})".format(e), HTTP_NOT_FOUND) 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/<path:path>") @app.route("/static/<path:path>")
def sendStatic(path): def sendStatic(path):

View File

@@ -5,6 +5,12 @@
<meta name="author" content="{{ conf['SITE_AUTHOR'] }}"> <meta name="author" content="{{ conf['SITE_AUTHOR'] }}">
<meta name="title" content="{{ conf['SITE_TITLE'] }}"> <meta name="title" content="{{ conf['SITE_TITLE'] }}">
{% if title %}
<title>{{ title }}</title>
{% else %}
<title>{{ conf['SITE_TITLE'] }}</title>
{% endif %}
<link rel="shortcut icon" href="/defaultFavicon.ico"> <link rel="shortcut icon" href="/defaultFavicon.ico">
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->

View File

@@ -3,7 +3,6 @@
<head> <head>
{% include 'head.html' %} {% include 'head.html' %}
<title>{{ article["title"] }}</title>
</head> </head>
<body class="bg-special"> <body class="bg-special">