Commit b629fcac authored by Luna's avatar Luna 📟

config.example.py: add NAME attribute

 - static: give inst_name on context
 - static/index: use inst_name
parent 2852f57f
Pipeline #37471512 failed with stage
in 5 minutes and 46 seconds
......@@ -6,6 +6,9 @@ class Config:
#: Main URL of the instance.
MAIN_URL = 'discordapp.io'
#: Name of the instance
NAME = 'Litecord/Nya'
#: Enable debug logging?
DEBUG = False
......@@ -36,6 +39,7 @@ class Config:
class Development(Config):
DEBUG = True
POSTGRES = {
'host': 'localhost',
'user': 'litecord',
......@@ -47,3 +51,10 @@ class Development(Config):
class Production(Config):
DEBUG = False
IS_SSL = True
POSTGRES = {
'host': 'some_production_postgres',
'user': 'some_production_user',
'password': 'some_production_password',
'database': 'litecord_or_anything_else_really',
}
......@@ -18,4 +18,5 @@ async def static_pages(path):
async def index_handler():
"""Handler for the index page."""
index_path = Path.cwd() / Path('static') / 'index.html'
return await render_template_string(index_path.read_text())
return await render_template_string(
index_path.read_text(), inst_name=app.config['NAME'])
{% block body %}
<center>
<h1>
welcome to a Litecord instance
welcome to {{ inst_name }}, a Litecord instance
</h1>
<p>
......@@ -10,7 +10,7 @@
</p>
<p>
It supports nodeinfo, despise not being part
It supports nodeinfo, despite not being part
in any federated network.
</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment