diff --git a/config.example.py b/config.example.py index 3f5f3a7..686cfc1 100644 --- a/config.example.py +++ b/config.example.py @@ -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', + } diff --git a/litecord/blueprints/static.py b/litecord/blueprints/static.py index 8b901c5..99ca3a6 100644 --- a/litecord/blueprints/static.py +++ b/litecord/blueprints/static.py @@ -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']) diff --git a/static/index.html b/static/index.html index f86e5cd..199f8df 100644 --- a/static/index.html +++ b/static/index.html @@ -1,7 +1,7 @@ {% block body %}

- welcome to a Litecord instance + welcome to {{ inst_name }}, a Litecord instance

@@ -10,7 +10,7 @@

- It supports nodeinfo, despise not being part + It supports nodeinfo, despite not being part in any federated network.