From d657930e858fe4e412920024470e1f432ce54059 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Sat, 2 May 2026 01:45:49 +0200 Subject: refactored main with the base template --- modules/main_generate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/main_generate.py') diff --git a/modules/main_generate.py b/modules/main_generate.py index a166a93..44e673e 100644 --- a/modules/main_generate.py +++ b/modules/main_generate.py @@ -13,6 +13,7 @@ from ..config import Config def init(jinja_env: jinja2.Environment, local: bool): jinja_env.globals.update(main={ + "main_name": Config.MAIN_NAME, "main_url": Config.MAIN_ROOT_URL, }) @@ -24,6 +25,6 @@ def generate(jinja_env: jinja2.Environment, output_root_path: str, local: bool): root_template = jinja_env.get_template("main.html.j2") with open(os.path.join(output_root_path, "index.html"), "w") as f: - f.write(root_template.render({"url" : Config.MAIN_ROOT_URL, "title": Config.MAIN_NAME})) + f.write(root_template.render({"url" : Config.MAIN_ROOT_URL})) shutil.copytree(Config.CODENAMES_ASSETS_SOURCE_DIR, output_root_path + Config.ASSETS_IMPORT_PATH) \ No newline at end of file -- cgit v1.3